k4compiler 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/k4compiler.gemspec +50 -0
- data/lib/k4compiler.rb +26 -0
- data/lib/k4compiler/compiler.rb +41 -0
- data/lib/k4compiler/compiler/base.rb +24 -0
- data/lib/k4compiler/compiler/closure.rb +96 -0
- data/lib/k4compiler/compiler/markdown.rb +78 -0
- data/lib/k4compiler/compiler/scss.rb +31 -0
- data/lib/k4compiler/config.rb +59 -0
- data/lib/k4compiler/version.rb +3 -0
- data/spec/k4compiler/compiler/base_spec.rb +40 -0
- data/spec/k4compiler/compiler/closure/compiled-src/hello-with-closure-compiled-script.js +18317 -0
- data/spec/k4compiler/compiler/closure/src/hello-compiled-script.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello-with-closure.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello.js +15 -0
- data/spec/k4compiler/compiler/closure_spec.rb +159 -0
- data/spec/k4compiler/compiler/markdown_spec.rb +153 -0
- data/spec/k4compiler/compiler/scss/_body.scss +5 -0
- data/spec/k4compiler/compiler/scss/sample.scss +9 -0
- data/spec/k4compiler/compiler/scss_spec.rb +70 -0
- data/spec/k4compiler/compiler_spec.rb +75 -0
- data/spec/k4compiler/config_spec.rb +116 -0
- data/spec/k4compiler_spec.rb +17 -0
- data/spec/spec_helper.rb +8 -0
- data/third_party/.gitkeep +1 -0
- data/third_party/closure-compiler-20130603/COPYING +202 -0
- data/third_party/closure-compiler-20130603/README +292 -0
- data/third_party/closure-compiler-20130603/compiler.jar +0 -0
- data/third_party/closure-library/.gitignore +12 -0
- data/third_party/closure-library/AUTHORS +17 -0
- data/third_party/closure-library/CONTRIBUTING +5 -0
- data/third_party/closure-library/LICENSE +176 -0
- data/third_party/closure-library/README +6 -0
- data/third_party/closure-library/all_tests.html +113 -0
- data/third_party/closure-library/alltests.js +16 -0
- data/third_party/closure-library/closure/bin/build/closurebuilder.py +262 -0
- data/third_party/closure-library/closure/bin/build/depstree.py +189 -0
- data/third_party/closure-library/closure/bin/build/depstree_test.py +127 -0
- data/third_party/closure-library/closure/bin/build/depswriter.py +202 -0
- data/third_party/closure-library/closure/bin/build/jscompiler.py +135 -0
- data/third_party/closure-library/closure/bin/build/jscompiler_test.py +120 -0
- data/third_party/closure-library/closure/bin/build/source.py +121 -0
- data/third_party/closure-library/closure/bin/build/source_test.py +134 -0
- data/third_party/closure-library/closure/bin/build/treescan.py +78 -0
- data/third_party/closure-library/closure/bin/calcdeps.py +590 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc.py +171 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc_test.py +167 -0
- data/third_party/closure-library/closure/bin/labs/code/run_py_tests.sh +28 -0
- data/third_party/closure-library/closure/bin/scopify.py +211 -0
- data/third_party/closure-library/closure/css/inlay/g-base.css +82 -0
- data/third_party/closure-library/closure/css/inlay/g-fixed.css +173 -0
- data/third_party/closure-library/closure/css/inlay/g-ratio.css +253 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer.js +108 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer_test.html +97 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria.js +362 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria_test.html +263 -0
- data/third_party/closure-library/closure/goog/a11y/aria/attributes.js +389 -0
- data/third_party/closure-library/closure/goog/a11y/aria/datatables.js +68 -0
- data/third_party/closure-library/closure/goog/a11y/aria/roles.js +216 -0
- data/third_party/closure-library/closure/goog/array/array.js +1507 -0
- data/third_party/closure-library/closure/goog/array/array_test.html +1674 -0
- data/third_party/closure-library/closure/goog/asserts/asserts.js +293 -0
- data/third_party/closure-library/closure/goog/asserts/asserts_test.html +178 -0
- data/third_party/closure-library/closure/goog/async/animationdelay.js +270 -0
- data/third_party/closure-library/closure/goog/async/animationdelay_test.html +93 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay.js +235 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
- data/third_party/closure-library/closure/goog/async/delay.js +177 -0
- data/third_party/closure-library/closure/goog/async/delay_test.html +148 -0
- data/third_party/closure-library/closure/goog/async/nexttick.js +174 -0
- data/third_party/closure-library/closure/goog/async/nexttick_test.html +137 -0
- data/third_party/closure-library/closure/goog/async/throttle.js +189 -0
- data/third_party/closure-library/closure/goog/async/throttle_test.html +102 -0
- data/third_party/closure-library/closure/goog/base.js +1593 -0
- data/third_party/closure-library/closure/goog/base_test.html +1206 -0
- data/third_party/closure-library/closure/goog/bootstrap/nodejs.js +91 -0
- data/third_party/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
- data/third_party/closure-library/closure/goog/color/alpha.js +467 -0
- data/third_party/closure-library/closure/goog/color/alpha_test.html +301 -0
- data/third_party/closure-library/closure/goog/color/color.js +773 -0
- data/third_party/closure-library/closure/goog/color/color_test.html +661 -0
- data/third_party/closure-library/closure/goog/color/names.js +176 -0
- data/third_party/closure-library/closure/goog/crypt/aes.js +1027 -0
- data/third_party/closure-library/closure/goog/crypt/aes_test.html +593 -0
- data/third_party/closure-library/closure/goog/crypt/arc4.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/arc4_test.html +63 -0
- data/third_party/closure-library/closure/goog/crypt/base64.js +272 -0
- data/third_party/closure-library/closure/goog/crypt/base64_test.html +117 -0
- data/third_party/closure-library/closure/goog/crypt/basen.js +242 -0
- data/third_party/closure-library/closure/goog/crypt/basen_test.html +167 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher.js +284 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher_test.html +385 -0
- data/third_party/closure-library/closure/goog/crypt/blockcipher.js +52 -0
- data/third_party/closure-library/closure/goog/crypt/cbc.js +150 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.html +18 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.js +100 -0
- data/third_party/closure-library/closure/goog/crypt/crypt.js +155 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_perf.html +85 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_test.html +98 -0
- data/third_party/closure-library/closure/goog/crypt/hash.js +62 -0
- data/third_party/closure-library/closure/goog/crypt/hash32.js +184 -0
- data/third_party/closure-library/closure/goog/crypt/hash32_test.html +287 -0
- data/third_party/closure-library/closure/goog/crypt/hashtester.js +243 -0
- data/third_party/closure-library/closure/goog/crypt/hmac.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/hmac_test.html +113 -0
- data/third_party/closure-library/closure/goog/crypt/md5.js +429 -0
- data/third_party/closure-library/closure/goog/crypt/md5_perf.html +39 -0
- data/third_party/closure-library/closure/goog/crypt/md5_test.html +152 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2.js +127 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2_test.html +68 -0
- data/third_party/closure-library/closure/goog/crypt/sha1.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_test.html +79 -0
- data/third_party/closure-library/closure/goog/crypt/sha2.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha224.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_test.html +57 -0
- data/third_party/closure-library/closure/goog/crypt/sha256.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_test.html +66 -0
- data/third_party/closure-library/closure/goog/css/autocomplete.css +43 -0
- data/third_party/closure-library/closure/goog/css/bubble.css +84 -0
- data/third_party/closure-library/closure/goog/css/button.css +38 -0
- data/third_party/closure-library/closure/goog/css/charpicker.css +206 -0
- data/third_party/closure-library/closure/goog/css/checkbox.css +38 -0
- data/third_party/closure-library/closure/goog/css/colormenubutton.css +25 -0
- data/third_party/closure-library/closure/goog/css/colorpalette.css +54 -0
- data/third_party/closure-library/closure/goog/css/colorpicker-simplegrid.css +49 -0
- data/third_party/closure-library/closure/goog/css/combobox.css +54 -0
- data/third_party/closure-library/closure/goog/css/common.css +41 -0
- data/third_party/closure-library/closure/goog/css/css3button.css +77 -0
- data/third_party/closure-library/closure/goog/css/css3menubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/custombutton.css +164 -0
- data/third_party/closure-library/closure/goog/css/datepicker.css +148 -0
- data/third_party/closure-library/closure/goog/css/dialog.css +72 -0
- data/third_party/closure-library/closure/goog/css/dimensionpicker.css +47 -0
- data/third_party/closure-library/closure/goog/css/dragdropdetector.css +48 -0
- data/third_party/closure-library/closure/goog/css/editor/bubble.css +73 -0
- data/third_party/closure-library/closure/goog/css/editor/dialog.css +66 -0
- data/third_party/closure-library/closure/goog/css/editor/equationeditor.css +113 -0
- data/third_party/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
- data/third_party/closure-library/closure/goog/css/editortoolbar.css +225 -0
- data/third_party/closure-library/closure/goog/css/filteredmenu.css +30 -0
- data/third_party/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
- data/third_party/closure-library/closure/goog/css/flatbutton.css +64 -0
- data/third_party/closure-library/closure/goog/css/flatmenubutton.css +63 -0
- data/third_party/closure-library/closure/goog/css/hovercard.css +51 -0
- data/third_party/closure-library/closure/goog/css/hsvapalette.css +231 -0
- data/third_party/closure-library/closure/goog/css/hsvpalette.css +179 -0
- data/third_party/closure-library/closure/goog/css/imagelessbutton.css +160 -0
- data/third_party/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/inputdatepicker.css +12 -0
- data/third_party/closure-library/closure/goog/css/linkbutton.css +26 -0
- data/third_party/closure-library/closure/goog/css/menu.css +27 -0
- data/third_party/closure-library/closure/goog/css/menubar.css +57 -0
- data/third_party/closure-library/closure/goog/css/menubutton.css +169 -0
- data/third_party/closure-library/closure/goog/css/menuitem.css +148 -0
- data/third_party/closure-library/closure/goog/css/menuseparator.css +19 -0
- data/third_party/closure-library/closure/goog/css/multitestrunner.css +121 -0
- data/third_party/closure-library/closure/goog/css/offline.css +147 -0
- data/third_party/closure-library/closure/goog/css/palette.css +36 -0
- data/third_party/closure-library/closure/goog/css/popupdatepicker.css +17 -0
- data/third_party/closure-library/closure/goog/css/roundedpanel.css +29 -0
- data/third_party/closure-library/closure/goog/css/roundedtab.css +158 -0
- data/third_party/closure-library/closure/goog/css/submenu.css +38 -0
- data/third_party/closure-library/closure/goog/css/tab.css +105 -0
- data/third_party/closure-library/closure/goog/css/tabbar.css +52 -0
- data/third_party/closure-library/closure/goog/css/tablesorter.css +14 -0
- data/third_party/closure-library/closure/goog/css/toolbar.css +400 -0
- data/third_party/closure-library/closure/goog/css/tooltip.css +14 -0
- data/third_party/closure-library/closure/goog/css/tree.css +146 -0
- data/third_party/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
- data/third_party/closure-library/closure/goog/cssom/cssom.js +449 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test.html +343 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style.js +1023 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
- data/third_party/closure-library/closure/goog/datasource/datamanager.js +559 -0
- data/third_party/closure-library/closure/goog/datasource/datasource.js +656 -0
- data/third_party/closure-library/closure/goog/datasource/datasource_test.html +265 -0
- data/third_party/closure-library/closure/goog/datasource/expr.js +544 -0
- data/third_party/closure-library/closure/goog/datasource/expr_test.html +97 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode.js +811 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
- data/third_party/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
- data/third_party/closure-library/closure/goog/datasource/jsondatasource.js +148 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +195 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
- data/third_party/closure-library/closure/goog/datasource/xmldatasource.js +415 -0
- data/third_party/closure-library/closure/goog/date/date.js +1718 -0
- data/third_party/closure-library/closure/goog/date/date_test.html +1392 -0
- data/third_party/closure-library/closure/goog/date/datelike.js +27 -0
- data/third_party/closure-library/closure/goog/date/daterange.js +413 -0
- data/third_party/closure-library/closure/goog/date/daterange_test.html +253 -0
- data/third_party/closure-library/closure/goog/date/relative.js +465 -0
- data/third_party/closure-library/closure/goog/date/relative_test.html +267 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime.js +179 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime_test.html +124 -0
- data/third_party/closure-library/closure/goog/db/cursor.js +214 -0
- data/third_party/closure-library/closure/goog/db/db.js +182 -0
- data/third_party/closure-library/closure/goog/db/db_test.html +1657 -0
- data/third_party/closure-library/closure/goog/db/error.js +359 -0
- data/third_party/closure-library/closure/goog/db/index.js +245 -0
- data/third_party/closure-library/closure/goog/db/indexeddb.js +337 -0
- data/third_party/closure-library/closure/goog/db/keyrange.js +117 -0
- data/third_party/closure-library/closure/goog/db/objectstore.js +399 -0
- data/third_party/closure-library/closure/goog/db/old_db_test.html +1244 -0
- data/third_party/closure-library/closure/goog/db/transaction.js +218 -0
- data/third_party/closure-library/closure/goog/debug/console.js +207 -0
- data/third_party/closure-library/closure/goog/debug/console_test.html +195 -0
- data/third_party/closure-library/closure/goog/debug/debug.js +501 -0
- data/third_party/closure-library/closure/goog/debug/debug_test.html +68 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow.js +615 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow_test.html +29 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss.js +444 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
- data/third_party/closure-library/closure/goog/debug/divconsole.js +141 -0
- data/third_party/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry.js +158 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry_test.html +87 -0
- data/third_party/closure-library/closure/goog/debug/error.js +51 -0
- data/third_party/closure-library/closure/goog/debug/error_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler.js +363 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_test.html +292 -0
- data/third_party/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter.js +376 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter_test.html +351 -0
- data/third_party/closure-library/closure/goog/debug/fancywindow.js +362 -0
- data/third_party/closure-library/closure/goog/debug/formatter.js +316 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay.js +162 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay_test.html +53 -0
- data/third_party/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer.js +147 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/debug/logger.js +853 -0
- data/third_party/closure-library/closure/goog/debug/logger_test.html +208 -0
- data/third_party/closure-library/closure/goog/debug/logrecord.js +271 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer.js +121 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer_test.html +96 -0
- data/third_party/closure-library/closure/goog/debug/reflect.js +178 -0
- data/third_party/closure-library/closure/goog/debug/reflect_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
- data/third_party/closure-library/closure/goog/debug/tracer.js +724 -0
- data/third_party/closure-library/closure/goog/debug/tracer_test.html +57 -0
- data/third_party/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
- data/third_party/closure-library/closure/goog/demos/animationqueue.html +149 -0
- data/third_party/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
- data/third_party/closure-library/closure/goog/demos/bidiinput.html +72 -0
- data/third_party/closure-library/closure/goog/demos/blobhasher.html +61 -0
- data/third_party/closure-library/closure/goog/demos/bubble.html +250 -0
- data/third_party/closure-library/closure/goog/demos/button.html +395 -0
- data/third_party/closure-library/closure/goog/demos/charcounter.html +57 -0
- data/third_party/closure-library/closure/goog/demos/charpicker.html +66 -0
- data/third_party/closure-library/closure/goog/demos/checkbox.html +122 -0
- data/third_party/closure-library/closure/goog/demos/color-contrast.html +60 -0
- data/third_party/closure-library/closure/goog/demos/colormenubutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/colorpicker.html +43 -0
- data/third_party/closure-library/closure/goog/demos/combobox.html +160 -0
- data/third_party/closure-library/closure/goog/demos/container.html +670 -0
- data/third_party/closure-library/closure/goog/demos/control.html +477 -0
- data/third_party/closure-library/closure/goog/demos/css/demo.css +75 -0
- data/third_party/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
- data/third_party/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
- data/third_party/closure-library/closure/goog/demos/css3button.html +166 -0
- data/third_party/closure-library/closure/goog/demos/css3menubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
- data/third_party/closure-library/closure/goog/demos/datepicker.html +183 -0
- data/third_party/closure-library/closure/goog/demos/debug.html +118 -0
- data/third_party/closure-library/closure/goog/demos/depsgraph.html +220 -0
- data/third_party/closure-library/closure/goog/demos/dialog.html +156 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
- data/third_party/closure-library/closure/goog/demos/dom_selection.html +88 -0
- data/third_party/closure-library/closure/goog/demos/drag.html +191 -0
- data/third_party/closure-library/closure/goog/demos/dragdrop.html +263 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
- data/third_party/closure-library/closure/goog/demos/dragger.html +83 -0
- data/third_party/closure-library/closure/goog/demos/draglistgroup.html +273 -0
- data/third_party/closure-library/closure/goog/demos/dragscrollsupport.html +133 -0
- data/third_party/closure-library/closure/goog/demos/drilldownrow.html +78 -0
- data/third_party/closure-library/closure/goog/demos/editor/deps.js +21 -0
- data/third_party/closure-library/closure/goog/demos/editor/editor.html +139 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.html +36 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.js +40 -0
- data/third_party/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog.js +171 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +116 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
- data/third_party/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
- data/third_party/closure-library/closure/goog/demos/editor/tableeditor.html +93 -0
- data/third_party/closure-library/closure/goog/demos/effects.html +162 -0
- data/third_party/closure-library/closure/goog/demos/emoji/200.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/201.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/202.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/203.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/204.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/205.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/206.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/none.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/event-propagation.html +192 -0
- data/third_party/closure-library/closure/goog/demos/events.html +99 -0
- data/third_party/closure-library/closure/goog/demos/eventtarget.html +70 -0
- data/third_party/closure-library/closure/goog/demos/filedrophandler.html +65 -0
- data/third_party/closure-library/closure/goog/demos/filteredmenu.html +118 -0
- data/third_party/closure-library/closure/goog/demos/focushandler.html +58 -0
- data/third_party/closure-library/closure/goog/demos/fpsdisplay.html +50 -0
- data/third_party/closure-library/closure/goog/demos/fx/css3/transition.html +222 -0
- data/third_party/closure-library/closure/goog/demos/gauge.html +158 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
- data/third_party/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
- data/third_party/closure-library/closure/goog/demos/graphics/events.html +114 -0
- data/third_party/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
- data/third_party/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tigerdata.js +2841 -0
- data/third_party/closure-library/closure/goog/demos/history1.html +132 -0
- data/third_party/closure-library/closure/goog/demos/history2.html +119 -0
- data/third_party/closure-library/closure/goog/demos/history3.html +116 -0
- data/third_party/closure-library/closure/goog/demos/history3js.html +48 -0
- data/third_party/closure-library/closure/goog/demos/history_blank.html +26 -0
- data/third_party/closure-library/closure/goog/demos/hovercard.html +177 -0
- data/third_party/closure-library/closure/goog/demos/hsvapalette.html +55 -0
- data/third_party/closure-library/closure/goog/demos/hsvpalette.html +56 -0
- data/third_party/closure-library/closure/goog/demos/html5history.html +87 -0
- data/third_party/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/index.html +20 -0
- data/third_party/closure-library/closure/goog/demos/index_nav.html +255 -0
- data/third_party/closure-library/closure/goog/demos/index_splash.html +27 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
- data/third_party/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
- data/third_party/closure-library/closure/goog/demos/inputhandler.html +88 -0
- data/third_party/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
- data/third_party/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
- data/third_party/closure-library/closure/goog/demos/keyhandler.html +118 -0
- data/third_party/closure-library/closure/goog/demos/labelinput.html +42 -0
- data/third_party/closure-library/closure/goog/demos/menu.html +220 -0
- data/third_party/closure-library/closure/goog/demos/menubar.html +211 -0
- data/third_party/closure-library/closure/goog/demos/menubutton.html +380 -0
- data/third_party/closure-library/closure/goog/demos/menubutton_frame.html +27 -0
- data/third_party/closure-library/closure/goog/demos/menuitem.html +164 -0
- data/third_party/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
- data/third_party/closure-library/closure/goog/demos/offline.html +268 -0
- data/third_party/closure-library/closure/goog/demos/onlinehandler.html +79 -0
- data/third_party/closure-library/closure/goog/demos/palette.html +302 -0
- data/third_party/closure-library/closure/goog/demos/pastehandler.html +54 -0
- data/third_party/closure-library/closure/goog/demos/pixeldensitymonitor.html +51 -0
- data/third_party/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
- data/third_party/closure-library/closure/goog/demos/popup.html +206 -0
- data/third_party/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
- data/third_party/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
- data/third_party/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
- data/third_party/closure-library/closure/goog/demos/popupmenu.html +116 -0
- data/third_party/closure-library/closure/goog/demos/progressbar.html +97 -0
- data/third_party/closure-library/closure/goog/demos/prompt.html +92 -0
- data/third_party/closure-library/closure/goog/demos/quadtree.html +107 -0
- data/third_party/closure-library/closure/goog/demos/ratings.html +121 -0
- data/third_party/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
- data/third_party/closure-library/closure/goog/demos/roundedpanel.html +139 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.html +75 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.js +197 -0
- data/third_party/closure-library/closure/goog/demos/scrollfloater.html +113 -0
- data/third_party/closure-library/closure/goog/demos/select.html +324 -0
- data/third_party/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
- data/third_party/closure-library/closure/goog/demos/serverchart.html +122 -0
- data/third_party/closure-library/closure/goog/demos/slider.html +128 -0
- data/third_party/closure-library/closure/goog/demos/splitbehavior.html +163 -0
- data/third_party/closure-library/closure/goog/demos/splitpane.html +243 -0
- data/third_party/closure-library/closure/goog/demos/stopevent.html +171 -0
- data/third_party/closure-library/closure/goog/demos/submenus.html +130 -0
- data/third_party/closure-library/closure/goog/demos/submenus2.html +150 -0
- data/third_party/closure-library/closure/goog/demos/tabbar.html +289 -0
- data/third_party/closure-library/closure/goog/demos/tablesorter.html +116 -0
- data/third_party/closure-library/closure/goog/demos/tabpane.html +302 -0
- data/third_party/closure-library/closure/goog/demos/textarea.html +128 -0
- data/third_party/closure-library/closure/goog/demos/timers.html +291 -0
- data/third_party/closure-library/closure/goog/demos/toolbar.html +703 -0
- data/third_party/closure-library/closure/goog/demos/tooltip.html +91 -0
- data/third_party/closure-library/closure/goog/demos/tracer.html +92 -0
- data/third_party/closure-library/closure/goog/demos/tree/demo.html +126 -0
- data/third_party/closure-library/closure/goog/demos/tree/testdata.js +260 -0
- data/third_party/closure-library/closure/goog/demos/tweakui.html +121 -0
- data/third_party/closure-library/closure/goog/demos/twothumbslider.html +121 -0
- data/third_party/closure-library/closure/goog/demos/useragent.html +214 -0
- data/third_party/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
- data/third_party/closure-library/closure/goog/demos/xpc/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/index.html +89 -0
- data/third_party/closure-library/closure/goog/demos/xpc/inner.html +58 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/relay.html +16 -0
- data/third_party/closure-library/closure/goog/demos/xpc/xpcdemo.js +307 -0
- data/third_party/closure-library/closure/goog/demos/zippy.html +149 -0
- data/third_party/closure-library/closure/goog/deps.js +911 -0
- data/third_party/closure-library/closure/goog/disposable/disposable.js +294 -0
- data/third_party/closure-library/closure/goog/disposable/disposable_test.html +307 -0
- data/third_party/closure-library/closure/goog/disposable/idisposable.js +45 -0
- data/third_party/closure-library/closure/goog/dom/a11y.js +169 -0
- data/third_party/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange.js +528 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
- data/third_party/closure-library/closure/goog/dom/annotate.js +355 -0
- data/third_party/closure-library/closure/goog/dom/annotate_test.html +215 -0
- data/third_party/closure-library/closure/goog/dom/browserfeature.js +67 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/abstractrange.js +352 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange.js +150 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange_test.html +638 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/geckorange.js +86 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/ierange.js +952 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/w3crange.js +365 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor.js +202 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.js +130 -0
- data/third_party/closure-library/closure/goog/dom/classes.js +227 -0
- data/third_party/closure-library/closure/goog/dom/classes_quirks_test.html +63 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.html +64 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.js +231 -0
- data/third_party/closure-library/closure/goog/dom/classlist.js +271 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.html +26 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.js +244 -0
- data/third_party/closure-library/closure/goog/dom/controlrange.js +505 -0
- data/third_party/closure-library/closure/goog/dom/controlrange_test.html +246 -0
- data/third_party/closure-library/closure/goog/dom/dataset.js +135 -0
- data/third_party/closure-library/closure/goog/dom/dataset_test.html +117 -0
- data/third_party/closure-library/closure/goog/dom/dom.js +2700 -0
- data/third_party/closure-library/closure/goog/dom/dom_quirks_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.js +1421 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor_test.html +284 -0
- data/third_party/closure-library/closure/goog/dom/forms.js +414 -0
- data/third_party/closure-library/closure/goog/dom/forms_test.html +501 -0
- data/third_party/closure-library/closure/goog/dom/fullscreen.js +124 -0
- data/third_party/closure-library/closure/goog/dom/iframe.js +163 -0
- data/third_party/closure-library/closure/goog/dom/iframe_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/iter.js +127 -0
- data/third_party/closure-library/closure/goog/dom/iter_test.html +97 -0
- data/third_party/closure-library/closure/goog/dom/multirange.js +519 -0
- data/third_party/closure-library/closure/goog/dom/multirange_test.html +67 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator.js +86 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset.js +112 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
- data/third_party/closure-library/closure/goog/dom/pattern/allchildren.js +75 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
- data/third_party/closure-library/closure/goog/dom/pattern/childmatches.js +154 -0
- data/third_party/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/fulltag.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
- data/third_party/closure-library/closure/goog/dom/pattern/nodetype.js +58 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
- data/third_party/closure-library/closure/goog/dom/pattern/repeat.js +190 -0
- data/third_party/closure-library/closure/goog/dom/pattern/sequence.js +141 -0
- data/third_party/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/tag.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/text.js +70 -0
- data/third_party/closure-library/closure/goog/dom/range.js +226 -0
- data/third_party/closure-library/closure/goog/dom/range_test.html +735 -0
- data/third_party/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange.js +215 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange_test.html +257 -0
- data/third_party/closure-library/closure/goog/dom/savedrange.js +74 -0
- data/third_party/closure-library/closure/goog/dom/savedrange_test.html +61 -0
- data/third_party/closure-library/closure/goog/dom/selection.js +470 -0
- data/third_party/closure-library/closure/goog/dom/selection_test.html +329 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator.js +367 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
- data/third_party/closure-library/closure/goog/dom/tagname.js +159 -0
- data/third_party/closure-library/closure/goog/dom/tagname_test.html +37 -0
- data/third_party/closure-library/closure/goog/dom/textrange.js +630 -0
- data/third_party/closure-library/closure/goog/dom/textrange_test.html +342 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator.js +244 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
- data/third_party/closure-library/closure/goog/dom/vendor.js +62 -0
- data/third_party/closure-library/closure/goog/dom/vendor_test.html +202 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor.js +180 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor_test.html +138 -0
- data/third_party/closure-library/closure/goog/dom/xml.js +204 -0
- data/third_party/closure-library/closure/goog/dom/xml_test.html +103 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature.js +273 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper.js +435 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
- data/third_party/closure-library/closure/goog/editor/command.js +76 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield.js +110 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield_test.html +62 -0
- data/third_party/closure-library/closure/goog/editor/defines.js +34 -0
- data/third_party/closure-library/closure/goog/editor/field.js +2725 -0
- data/third_party/closure-library/closure/goog/editor/field_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/field_test.js +1278 -0
- data/third_party/closure-library/closure/goog/editor/focus.js +32 -0
- data/third_party/closure-library/closure/goog/editor/focus_test.html +66 -0
- data/third_party/closure-library/closure/goog/editor/icontent.js +296 -0
- data/third_party/closure-library/closure/goog/editor/icontent_test.html +232 -0
- data/third_party/closure-library/closure/goog/editor/link.js +359 -0
- data/third_party/closure-library/closure/goog/editor/link_test.html +252 -0
- data/third_party/closure-library/closure/goog/editor/node.js +483 -0
- data/third_party/closure-library/closure/goog/editor/node_test.html +631 -0
- data/third_party/closure-library/closure/goog/editor/plugin.js +463 -0
- data/third_party/closure-library/closure/goog/editor/plugin_test.html +187 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +630 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +313 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +334 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +404 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter.js +1750 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote.js +479 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote_test.html +212 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons.js +88 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons_test.html +92 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler.js +767 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler_test.html +754 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorbubble.js +153 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin.js +215 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin_test.html +120 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong.js +326 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong_test.html +411 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble.js +562 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble_test.html +375 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +437 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +740 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin.js +63 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin_test.html +70 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum.js +188 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting.js +779 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting_test.html +961 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor.js +472 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +742 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +549 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo.js +1015 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate.js +86 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
- data/third_party/closure-library/closure/goog/editor/range.js +632 -0
- data/third_party/closure-library/closure/goog/editor/range_test.html +1004 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield.js +738 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +28 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.js +472 -0
- data/third_party/closure-library/closure/goog/editor/style.js +222 -0
- data/third_party/closure-library/closure/goog/editor/style_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/table.js +567 -0
- data/third_party/closure-library/closure/goog/editor/table_test.html +529 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper.js +136 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper_test.html +211 -0
- data/third_party/closure-library/closure/goog/events/actionhandler.js +181 -0
- data/third_party/closure-library/closure/goog/events/actionhandler_test.html +82 -0
- data/third_party/closure-library/closure/goog/events/browserevent.js +411 -0
- data/third_party/closure-library/closure/goog/events/browserevent_test.html +161 -0
- data/third_party/closure-library/closure/goog/events/browserfeature.js +85 -0
- data/third_party/closure-library/closure/goog/events/event.js +154 -0
- data/third_party/closure-library/closure/goog/events/event_test.html +66 -0
- data/third_party/closure-library/closure/goog/events/eventhandler.js +291 -0
- data/third_party/closure-library/closure/goog/events/eventhandler_test.html +254 -0
- data/third_party/closure-library/closure/goog/events/events.js +1095 -0
- data/third_party/closure-library/closure/goog/events/events_test.html +659 -0
- data/third_party/closure-library/closure/goog/events/eventtarget.js +401 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_test.html +70 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_googevents_test.html +85 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_w3cinterface_test.html +49 -0
- data/third_party/closure-library/closure/goog/events/eventtargettester.js +1028 -0
- data/third_party/closure-library/closure/goog/events/eventtype.js +165 -0
- data/third_party/closure-library/closure/goog/events/eventwrapper.js +66 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler.js +221 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
- data/third_party/closure-library/closure/goog/events/focushandler.js +106 -0
- data/third_party/closure-library/closure/goog/events/imehandler.js +363 -0
- data/third_party/closure-library/closure/goog/events/imehandler_test.html +269 -0
- data/third_party/closure-library/closure/goog/events/inputhandler.js +213 -0
- data/third_party/closure-library/closure/goog/events/keycodes.js +377 -0
- data/third_party/closure-library/closure/goog/events/keycodes_test.html +125 -0
- data/third_party/closure-library/closure/goog/events/keyhandler.js +556 -0
- data/third_party/closure-library/closure/goog/events/keyhandler_test.html +727 -0
- data/third_party/closure-library/closure/goog/events/keynames.js +132 -0
- data/third_party/closure-library/closure/goog/events/listenable.js +323 -0
- data/third_party/closure-library/closure/goog/events/listenable_test.html +31 -0
- data/third_party/closure-library/closure/goog/events/listener.js +131 -0
- data/third_party/closure-library/closure/goog/events/listenermap.js +299 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.html +19 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.js +116 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler.js +295 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler_test.html +385 -0
- data/third_party/closure-library/closure/goog/events/onlinehandler.js +162 -0
- data/third_party/closure-library/closure/goog/events/onlinelistener_test.html +160 -0
- data/third_party/closure-library/closure/goog/events/pastehandler.js +515 -0
- data/third_party/closure-library/closure/goog/events/pastehandler_test.html +414 -0
- data/third_party/closure-library/closure/goog/format/emailaddress.js +332 -0
- data/third_party/closure-library/closure/goog/format/emailaddress_test.html +192 -0
- data/third_party/closure-library/closure/goog/format/format.js +491 -0
- data/third_party/closure-library/closure/goog/format/format_test.html +302 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter.js +407 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter.js +413 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
- data/third_party/closure-library/closure/goog/fs/entry.js +272 -0
- data/third_party/closure-library/closure/goog/fs/entryimpl.js +399 -0
- data/third_party/closure-library/closure/goog/fs/error.js +102 -0
- data/third_party/closure-library/closure/goog/fs/filereader.js +288 -0
- data/third_party/closure-library/closure/goog/fs/filesaver.js +176 -0
- data/third_party/closure-library/closure/goog/fs/filesystem.js +41 -0
- data/third_party/closure-library/closure/goog/fs/filesystemimpl.js +64 -0
- data/third_party/closure-library/closure/goog/fs/filewriter.js +110 -0
- data/third_party/closure-library/closure/goog/fs/fs.js +253 -0
- data/third_party/closure-library/closure/goog/fs/fs_test.html +754 -0
- data/third_party/closure-library/closure/goog/fs/progressevent.js +68 -0
- data/third_party/closure-library/closure/goog/functions/functions.js +255 -0
- data/third_party/closure-library/closure/goog/functions/functions_test.html +223 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop.js +1517 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop_test.html +663 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim.js +210 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim_test.html +225 -0
- data/third_party/closure-library/closure/goog/fx/animation.js +530 -0
- data/third_party/closure-library/closure/goog/fx/animation_test.html +117 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue.js +307 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue_test.html +316 -0
- data/third_party/closure-library/closure/goog/fx/css3/fx.js +62 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition.js +196 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition_test.html +224 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation.js +113 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation_test.html +126 -0
- data/third_party/closure-library/closure/goog/fx/dom.js +653 -0
- data/third_party/closure-library/closure/goog/fx/dragdrop.js +50 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup.js +109 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
- data/third_party/closure-library/closure/goog/fx/dragger.js +795 -0
- data/third_party/closure-library/closure/goog/fx/dragger_test.html +449 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup.js +1301 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup_test.html +403 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport.js +299 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport_test.html +354 -0
- data/third_party/closure-library/closure/goog/fx/easing.js +50 -0
- data/third_party/closure-library/closure/goog/fx/fx.js +32 -0
- data/third_party/closure-library/closure/goog/fx/fx_test.html +100 -0
- data/third_party/closure-library/closure/goog/fx/transition.js +75 -0
- data/third_party/closure-library/closure/goog/fx/transitionbase.js +237 -0
- data/third_party/closure-library/closure/goog/gears/basestore.js +521 -0
- data/third_party/closure-library/closure/goog/gears/basestore_test.html +247 -0
- data/third_party/closure-library/closure/goog/gears/database.js +934 -0
- data/third_party/closure-library/closure/goog/gears/database_test.html +699 -0
- data/third_party/closure-library/closure/goog/gears/gears.js +228 -0
- data/third_party/closure-library/closure/goog/gears/gears_test.html +78 -0
- data/third_party/closure-library/closure/goog/gears/httprequest.js +80 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient.js +130 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient_test.html +172 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver.js +157 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver_test.html +119 -0
- data/third_party/closure-library/closure/goog/gears/logstore.js +478 -0
- data/third_party/closure-library/closure/goog/gears/logstore_test.html +600 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore.js +555 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata.js +204 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata_test.html +221 -0
- data/third_party/closure-library/closure/goog/gears/statustype.js +37 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture.js +370 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
- data/third_party/closure-library/closure/goog/gears/worker.js +200 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel.js +205 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
- data/third_party/closure-library/closure/goog/gears/workerpool.js +240 -0
- data/third_party/closure-library/closure/goog/gears/workerpool_test.html +204 -0
- data/third_party/closure-library/closure/goog/graphics/abstractgraphics.js +441 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform.js +587 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform_test.html +360 -0
- data/third_party/closure-library/closure/goog/graphics/canvaselement.js +792 -0
- data/third_party/closure-library/closure/goog/graphics/canvasgraphics.js +665 -0
- data/third_party/closure-library/closure/goog/graphics/element.js +151 -0
- data/third_party/closure-library/closure/goog/graphics/ellipseelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates.js +159 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element.js +968 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ellipse.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ext.js +29 -0
- data/third_party/closure-library/closure/goog/graphics/ext/graphics.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/group.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/image.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path.js +142 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
- data/third_party/closure-library/closure/goog/graphics/ext/rectangle.js +54 -0
- data/third_party/closure-library/closure/goog/graphics/ext/shape.js +146 -0
- data/third_party/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/fill.js +46 -0
- data/third_party/closure-library/closure/goog/graphics/font.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/graphics.js +135 -0
- data/third_party/closure-library/closure/goog/graphics/groupelement.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/imageelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/lineargradient.js +174 -0
- data/third_party/closure-library/closure/goog/graphics/path.js +512 -0
- data/third_party/closure-library/closure/goog/graphics/path_test.html +359 -0
- data/third_party/closure-library/closure/goog/graphics/pathelement.js +55 -0
- data/third_party/closure-library/closure/goog/graphics/paths.js +86 -0
- data/third_party/closure-library/closure/goog/graphics/paths_test.html +98 -0
- data/third_party/closure-library/closure/goog/graphics/rectelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill.js +74 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill_test.html +53 -0
- data/third_party/closure-library/closure/goog/graphics/stroke.js +67 -0
- data/third_party/closure-library/closure/goog/graphics/strokeandfillelement.js +115 -0
- data/third_party/closure-library/closure/goog/graphics/svgelement.js +279 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics.js +857 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics_test.html +83 -0
- data/third_party/closure-library/closure/goog/graphics/textelement.js +56 -0
- data/third_party/closure-library/closure/goog/graphics/vmlelement.js +433 -0
- data/third_party/closure-library/closure/goog/graphics/vmlgraphics.js +893 -0
- data/third_party/closure-library/closure/goog/history/event.js +54 -0
- data/third_party/closure-library/closure/goog/history/eventtype.js +30 -0
- data/third_party/closure-library/closure/goog/history/history.js +998 -0
- data/third_party/closure-library/closure/goog/history/history_test.html +19 -0
- data/third_party/closure-library/closure/goog/history/history_test.js +54 -0
- data/third_party/closure-library/closure/goog/history/html5history.js +303 -0
- data/third_party/closure-library/closure/goog/history/html5history_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/bidi.js +806 -0
- data/third_party/closure-library/closure/goog/i18n/bidi_test.html +425 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter.js +490 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
- data/third_party/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
- data/third_party/closure-library/closure/goog/i18n/collation.js +58 -0
- data/third_party/closure-library/closure/goog/i18n/collation_test.html +63 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols.js +7973 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols_ext.js +27549 -0
- data/third_party/closure-library/closure/goog/i18n/currency.js +424 -0
- data/third_party/closure-library/closure/goog/i18n/currency_test.html +204 -0
- data/third_party/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat.js +673 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat_test.html +532 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse.js +1129 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse_test.html +766 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatterns.js +1854 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatternsext.js +10947 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbols.js +3713 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbolsext.js +21152 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak.js +214 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak_test.html +80 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat.js +771 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat_test.html +471 -0
- data/third_party/closure-library/closure/goog/i18n/mime.js +111 -0
- data/third_party/closure-library/closure/goog/i18n/mime_test.html +51 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat.js +1228 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat_test.html +985 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbols.js +3416 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbolsext.js +11887 -0
- data/third_party/closure-library/closure/goog/i18n/ordinalrules.js +589 -0
- data/third_party/closure-library/closure/goog/i18n/pluralrules.js +859 -0
- data/third_party/closure-library/closure/goog/i18n/timezone.js +340 -0
- data/third_party/closure-library/closure/goog/i18n/timezone_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/uchar.js +1368 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher.js +73 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher_test.html +62 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/namefetcher.js +70 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher.js +281 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher_test.html +111 -0
- data/third_party/closure-library/closure/goog/i18n/uchar_test.html +133 -0
- data/third_party/closure-library/closure/goog/images/blank.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_close.jpg +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_left.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_right.gif +0 -0
- data/third_party/closure-library/closure/goog/images/button-bg.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-outline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check.gif +0 -0
- data/third_party/closure-library/closure/goog/images/close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdown.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_offline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_online.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_paused.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_syncing.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/menu-arrows.gif +0 -0
- data/third_party/closure-library/closure/goog/images/minus.png +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/offlineicons.png +0 -0
- data/third_party/closure-library/closure/goog/images/plus.png +0 -0
- data/third_party/closure-library/closure/goog/images/ratingstars.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-bg.png +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/I.png +0 -0
- data/third_party/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.png +0 -0
- data/third_party/closure-library/closure/goog/images/ui_controls.jpg +0 -0
- data/third_party/closure-library/closure/goog/iter/iter.js +702 -0
- data/third_party/closure-library/closure/goog/iter/iter_test.html +479 -0
- data/third_party/closure-library/closure/goog/json/evaljsonprocessor.js +66 -0
- data/third_party/closure-library/closure/goog/json/json.js +349 -0
- data/third_party/closure-library/closure/goog/json/json_perf.html +116 -0
- data/third_party/closure-library/closure/goog/json/json_test.html +569 -0
- data/third_party/closure-library/closure/goog/json/nativejsonprocessor.js +73 -0
- data/third_party/closure-library/closure/goog/json/processor.js +33 -0
- data/third_party/closure-library/closure/goog/json/processor_test.html +89 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef.js +162 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef_test.html +103 -0
- data/third_party/closure-library/closure/goog/labs/events/touch.js +82 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.html +19 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.js +96 -0
- data/third_party/closure-library/closure/goog/labs/format/csv.js +391 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.html +20 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.js +169 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock.js +733 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock_test.html +416 -0
- data/third_party/closure-library/closure/goog/labs/net/image.js +93 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.js +128 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_json.data +2 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_text.data +1 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel.js +188 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/basetestchannel.js +639 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/channel.js +195 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/requeststats.js +391 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase.js +2171 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.js +1400 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport.js +274 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport_test.html +228 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchanneldebug.js +298 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest.js +1291 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest_test.html +287 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransport.js +74 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransportfactory.js +35 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr.js +449 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr_test.html +455 -0
- data/third_party/closure-library/closure/goog/labs/object/object.js +46 -0
- data/third_party/closure-library/closure/goog/labs/object/object_test.html +56 -0
- data/third_party/closure-library/closure/goog/labs/observe/notice.js +63 -0
- data/third_party/closure-library/closure/goog/labs/observe/observable.js +77 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset.js +180 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset_test.html +207 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset.js +156 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset_test.html +252 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer.js +100 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer_test.html +65 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable.js +129 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable_test.html +196 -0
- data/third_party/closure-library/closure/goog/labs/structs/map.js +339 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_perf.js +201 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_test.html +434 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap.js +279 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap_test.html +332 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor.js +178 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.js +146 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat.js +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat_test.html +73 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher.js +94 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher_test.html +43 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher.js +266 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher_test.html +70 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher.js +206 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher_test.html +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/matcher.js +51 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher.js +334 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher_test.html +79 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher.js +306 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher_test.html +102 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher.js +402 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher_test.html +101 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser.js +189 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device.js +64 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.js +88 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine.js +144 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.js +164 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.js +256 -0
- data/third_party/closure-library/closure/goog/labs/useragent/test_agents.js +272 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util.js +89 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.js +60 -0
- data/third_party/closure-library/closure/goog/locale/countries.js +291 -0
- data/third_party/closure-library/closure/goog/locale/countrylanguagenames_test.html +237 -0
- data/third_party/closure-library/closure/goog/locale/defaultlocalenameconstants.js +907 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames.js +73 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnamesdata.js +327 -0
- data/third_party/closure-library/closure/goog/locale/locale.js +403 -0
- data/third_party/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
- data/third_party/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection.js +117 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
- data/third_party/closure-library/closure/goog/locale/timezonefingerprint.js +248 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist.js +131 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
- data/third_party/closure-library/closure/goog/log/log.js +183 -0
- data/third_party/closure-library/closure/goog/log/log_test.js +169 -0
- data/third_party/closure-library/closure/goog/math/bezier.js +311 -0
- data/third_party/closure-library/closure/goog/math/bezier_test.html +112 -0
- data/third_party/closure-library/closure/goog/math/box.js +369 -0
- data/third_party/closure-library/closure/goog/math/box_test.html +298 -0
- data/third_party/closure-library/closure/goog/math/coordinate.js +233 -0
- data/third_party/closure-library/closure/goog/math/coordinate3.js +169 -0
- data/third_party/closure-library/closure/goog/math/coordinate3_test.html +204 -0
- data/third_party/closure-library/closure/goog/math/coordinate_test.html +159 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff.js +103 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff_test.html +67 -0
- data/third_party/closure-library/closure/goog/math/integer.js +737 -0
- data/third_party/closure-library/closure/goog/math/integer_test.html +1653 -0
- data/third_party/closure-library/closure/goog/math/interpolator/interpolator1.js +64 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1.js +82 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1_test.html +87 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1.js +81 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1_test.html +74 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1.js +202 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/line.js +177 -0
- data/third_party/closure-library/closure/goog/math/line_test.html +62 -0
- data/third_party/closure-library/closure/goog/math/long.js +802 -0
- data/third_party/closure-library/closure/goog/math/long_test.html +1571 -0
- data/third_party/closure-library/closure/goog/math/math.js +387 -0
- data/third_party/closure-library/closure/goog/math/math_test.html +292 -0
- data/third_party/closure-library/closure/goog/math/matrix.js +675 -0
- data/third_party/closure-library/closure/goog/math/matrix_test.html +434 -0
- data/third_party/closure-library/closure/goog/math/range.js +144 -0
- data/third_party/closure-library/closure/goog/math/range_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/rangeset.js +394 -0
- data/third_party/closure-library/closure/goog/math/rangeset_test.html +664 -0
- data/third_party/closure-library/closure/goog/math/rect.js +463 -0
- data/third_party/closure-library/closure/goog/math/rect_test.html +444 -0
- data/third_party/closure-library/closure/goog/math/size.js +206 -0
- data/third_party/closure-library/closure/goog/math/size_test.html +180 -0
- data/third_party/closure-library/closure/goog/math/tdma.js +73 -0
- data/third_party/closure-library/closure/goog/math/tdma_test.html +33 -0
- data/third_party/closure-library/closure/goog/math/vec2.js +283 -0
- data/third_party/closure-library/closure/goog/math/vec2_test.html +225 -0
- data/third_party/closure-library/closure/goog/math/vec3.js +308 -0
- data/third_party/closure-library/closure/goog/math/vec3_test.html +221 -0
- data/third_party/closure-library/closure/goog/memoize/memoize.js +102 -0
- data/third_party/closure-library/closure/goog/memoize/memoize_test.html +157 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel.js +210 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel_test.html +89 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel.js +287 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel_test.html +283 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel_test.html +113 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient.js +131 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
- data/third_party/closure-library/closure/goog/messaging/messagechannel.js +116 -0
- data/third_party/closure-library/closure/goog/messaging/messaging.js +34 -0
- data/third_party/closure-library/closure/goog/messaging/messaging_test.html +42 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel.js +302 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller.js +151 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller_test.html +65 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel.js +401 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel_test.html +392 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork.js +78 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork_test.html +74 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator.js +197 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator_test.html +112 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel.js +236 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel_test.html +161 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_inner.html +28 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html +29 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_inner.html +34 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker1.js +32 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker2.js +32 -0
- data/third_party/closure-library/closure/goog/module/abstractmoduleloader.js +56 -0
- data/third_party/closure-library/closure/goog/module/basemodule.js +45 -0
- data/third_party/closure-library/closure/goog/module/loader.js +269 -0
- data/third_party/closure-library/closure/goog/module/module.js +166 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo.js +335 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo_test.html +108 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
- data/third_party/closure-library/closure/goog/module/moduleloader.js +462 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.html +30 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.js +438 -0
- data/third_party/closure-library/closure/goog/module/modulemanager.js +1370 -0
- data/third_party/closure-library/closure/goog/module/modulemanager_test.html +2143 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_1.js +23 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_2.js +27 -0
- data/third_party/closure-library/closure/goog/module/testdata/modB_1.js +31 -0
- data/third_party/closure-library/closure/goog/net/browserchannel.js +2757 -0
- data/third_party/closure-library/closure/goog/net/browserchannel_test.html +1328 -0
- data/third_party/closure-library/closure/goog/net/browsertestchannel.js +618 -0
- data/third_party/closure-library/closure/goog/net/bulkloader.js +181 -0
- data/third_party/closure-library/closure/goog/net/bulkloader_test.html +233 -0
- data/third_party/closure-library/closure/goog/net/bulkloaderhelper.js +127 -0
- data/third_party/closure-library/closure/goog/net/channeldebug.js +300 -0
- data/third_party/closure-library/closure/goog/net/channelrequest.js +1312 -0
- data/third_party/closure-library/closure/goog/net/channelrequest_test.html +280 -0
- data/third_party/closure-library/closure/goog/net/cookies.js +370 -0
- data/third_party/closure-library/closure/goog/net/cookies_test.html +266 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc.js +849 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.css +7 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
- data/third_party/closure-library/closure/goog/net/errorcode.js +130 -0
- data/third_party/closure-library/closure/goog/net/eventtype.js +37 -0
- data/third_party/closure-library/closure/goog/net/filedownloader.js +743 -0
- data/third_party/closure-library/closure/goog/net/filedownloader_test.html +372 -0
- data/third_party/closure-library/closure/goog/net/httpstatus.js +111 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test.html +147 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
- data/third_party/closure-library/closure/goog/net/iframeio.js +1355 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.html +44 -0
- data/third_party/closure-library/closure/goog/net/iframeio_test.html +402 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor.js +200 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
- data/third_party/closure-library/closure/goog/net/imageloader.js +292 -0
- data/third_party/closure-library/closure/goog/net/imageloader_test.html +302 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
- data/third_party/closure-library/closure/goog/net/ipaddress.js +511 -0
- data/third_party/closure-library/closure/goog/net/ipaddress_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/jsloader.js +366 -0
- data/third_party/closure-library/closure/goog/net/jsloader_test.html +142 -0
- data/third_party/closure-library/closure/goog/net/jsonp.js +338 -0
- data/third_party/closure-library/closure/goog/net/jsonp_test.html +327 -0
- data/third_party/closure-library/closure/goog/net/mockiframeio.js +319 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor.js +117 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
- data/third_party/closure-library/closure/goog/net/networkstatusmonitor.js +47 -0
- data/third_party/closure-library/closure/goog/net/networktester.js +383 -0
- data/third_party/closure-library/closure/goog/net/networktester_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test1.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test2.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test3.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test4.js +23 -0
- data/third_party/closure-library/closure/goog/net/tmpnetwork.js +164 -0
- data/third_party/closure-library/closure/goog/net/websocket.js +505 -0
- data/third_party/closure-library/closure/goog/net/websocket_test.html +367 -0
- data/third_party/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
- data/third_party/closure-library/closure/goog/net/xhrio.js +1191 -0
- data/third_party/closure-library/closure/goog/net/xhrio_test.html +732 -0
- data/third_party/closure-library/closure/goog/net/xhriopool.js +80 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager.js +787 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager_test.html +123 -0
- data/third_party/closure-library/closure/goog/net/xmlhttp.js +228 -0
- data/third_party/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel.js +805 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +1024 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannelrole.js +30 -0
- data/third_party/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +254 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport.js +921 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport_test.html +295 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframerelaytransport.js +394 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +649 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +304 -0
- data/third_party/closure-library/closure/goog/net/xpc/nixtransport.js +479 -0
- data/third_party/closure-library/closure/goog/net/xpc/relay.js +72 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/access_checker.html +29 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +96 -0
- data/third_party/closure-library/closure/goog/net/xpc/transport.js +105 -0
- data/third_party/closure-library/closure/goog/net/xpc/xpc.js +293 -0
- data/third_party/closure-library/closure/goog/object/object.js +635 -0
- data/third_party/closure-library/closure/goog/object/object_test.html +466 -0
- data/third_party/closure-library/closure/goog/positioning/absoluteposition.js +74 -0
- data/third_party/closure-library/closure/goog/positioning/abstractposition.js +48 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition.js +92 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition_test.html +77 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition.js +191 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +174 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition.js +88 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.html +22 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.js +122 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition.js +71 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition_test.html +119 -0
- data/third_party/closure-library/closure/goog/positioning/positioning.js +557 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.html +199 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.js +1168 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition.js +121 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition_test.html +189 -0
- data/third_party/closure-library/closure/goog/positioning/viewportposition.js +64 -0
- data/third_party/closure-library/closure/goog/proto/proto.js +44 -0
- data/third_party/closure-library/closure/goog/proto/serializer.js +69 -0
- data/third_party/closure-library/closure/goog/proto/serializer_test.html +43 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor.js +200 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor.js +291 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor_test.html +132 -0
- data/third_party/closure-library/closure/goog/proto2/lazydeserializer.js +70 -0
- data/third_party/closure-library/closure/goog/proto2/message.js +840 -0
- data/third_party/closure-library/closure/goog/proto2/message_test.html +467 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer.js +159 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer_test.html +489 -0
- data/third_party/closure-library/closure/goog/proto2/package_test.pb.js +166 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer.js +193 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer_test.html +504 -0
- data/third_party/closure-library/closure/goog/proto2/proto_test.html +693 -0
- data/third_party/closure-library/closure/goog/proto2/serializer.js +174 -0
- data/third_party/closure-library/closure/goog/proto2/test.pb.js +2876 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer.js +995 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.html +21 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.js +629 -0
- data/third_party/closure-library/closure/goog/proto2/util.js +54 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub.js +326 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_perf.html +298 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
- data/third_party/closure-library/closure/goog/reflect/reflect.js +77 -0
- data/third_party/closure-library/closure/goog/result/chain_test.html +236 -0
- data/third_party/closure-library/closure/goog/result/combine_test.html +229 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor.js +57 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor_test.html +86 -0
- data/third_party/closure-library/closure/goog/result/dependentresult.js +44 -0
- data/third_party/closure-library/closure/goog/result/result_interface.js +109 -0
- data/third_party/closure-library/closure/goog/result/resultutil.js +550 -0
- data/third_party/closure-library/closure/goog/result/resultutil_test.html +46 -0
- data/third_party/closure-library/closure/goog/result/simpleresult.js +217 -0
- data/third_party/closure-library/closure/goog/result/simpleresult_test.html +271 -0
- data/third_party/closure-library/closure/goog/result/transform_test.html +153 -0
- data/third_party/closure-library/closure/goog/result/wait_test.html +211 -0
- data/third_party/closure-library/closure/goog/soy/data.js +132 -0
- data/third_party/closure-library/closure/goog/soy/renderer.js +266 -0
- data/third_party/closure-library/closure/goog/soy/renderer_test.html +172 -0
- data/third_party/closure-library/closure/goog/soy/soy.js +205 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.html +230 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.js +175 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck.js +475 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
- data/third_party/closure-library/closure/goog/stats/basicstat.js +271 -0
- data/third_party/closure-library/closure/goog/stats/basicstat_test.html +167 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage.js +100 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage_test.html +76 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage.js +201 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage_test.html +160 -0
- data/third_party/closure-library/closure/goog/storage/errorcode.js +30 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage.js +142 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage_test.html +90 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorcode.js +31 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism.js +128 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism_test.html +83 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage.js +45 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage_test.html +60 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage.js +46 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage_test.html +61 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage.js +176 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage_test.html +122 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata.js +283 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata_test.html +78 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanism.js +86 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanismtester.js +117 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanism.js +56 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory.js +113 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory_test.html +58 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismseparationtester.js +91 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismsharingtester.js +87 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismtester.js +200 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism.js +97 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism_test.html +66 -0
- data/third_party/closure-library/closure/goog/storage/richstorage.js +149 -0
- data/third_party/closure-library/closure/goog/storage/richstorage_test.html +87 -0
- data/third_party/closure-library/closure/goog/storage/storage.js +111 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.html +64 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.js +60 -0
- data/third_party/closure-library/closure/goog/string/linkify.js +236 -0
- data/third_party/closure-library/closure/goog/string/linkify_test.html +441 -0
- data/third_party/closure-library/closure/goog/string/newlines.js +153 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.js +87 -0
- data/third_party/closure-library/closure/goog/string/parser.js +38 -0
- data/third_party/closure-library/closure/goog/string/path.js +169 -0
- data/third_party/closure-library/closure/goog/string/path_test.html +111 -0
- data/third_party/closure-library/closure/goog/string/string.js +1378 -0
- data/third_party/closure-library/closure/goog/string/string_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/string_test.js +1173 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer.js +103 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
- data/third_party/closure-library/closure/goog/string/stringformat.js +251 -0
- data/third_party/closure-library/closure/goog/string/stringformat_test.html +223 -0
- data/third_party/closure-library/closure/goog/string/stringifier.js +38 -0
- data/third_party/closure-library/closure/goog/structs/avltree.js +835 -0
- data/third_party/closure-library/closure/goog/structs/avltree_test.html +303 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer.js +223 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/structs/collection.js +55 -0
- data/third_party/closure-library/closure/goog/structs/collection_test.html +57 -0
- data/third_party/closure-library/closure/goog/structs/heap.js +333 -0
- data/third_party/closure-library/closure/goog/structs/heap_test.html +220 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap.js +159 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap.js +473 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
- data/third_party/closure-library/closure/goog/structs/map.js +449 -0
- data/third_party/closure-library/closure/goog/structs/map_test.html +430 -0
- data/third_party/closure-library/closure/goog/structs/node.js +74 -0
- data/third_party/closure-library/closure/goog/structs/pool.js +381 -0
- data/third_party/closure-library/closure/goog/structs/pool_test.html +291 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool.js +184 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool_test.html +588 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue.js +64 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/quadtree.js +571 -0
- data/third_party/closure-library/closure/goog/structs/quadtree_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/queue.js +157 -0
- data/third_party/closure-library/closure/goog/structs/queue_test.html +140 -0
- data/third_party/closure-library/closure/goog/structs/set.js +274 -0
- data/third_party/closure-library/closure/goog/structs/set_perf.html +271 -0
- data/third_party/closure-library/closure/goog/structs/set_test.html +581 -0
- data/third_party/closure-library/closure/goog/structs/simplepool.js +205 -0
- data/third_party/closure-library/closure/goog/structs/stringset.js +403 -0
- data/third_party/closure-library/closure/goog/structs/stringset_test.html +265 -0
- data/third_party/closure-library/closure/goog/structs/structs.js +351 -0
- data/third_party/closure-library/closure/goog/structs/structs_test.html +1050 -0
- data/third_party/closure-library/closure/goog/structs/treenode.js +428 -0
- data/third_party/closure-library/closure/goog/structs/treenode_test.html +370 -0
- data/third_party/closure-library/closure/goog/structs/trie.js +368 -0
- data/third_party/closure-library/closure/goog/structs/trie_test.html +378 -0
- data/third_party/closure-library/closure/goog/style/bidi.js +182 -0
- data/third_party/closure-library/closure/goog/style/bidi_test.html +211 -0
- data/third_party/closure-library/closure/goog/style/cursor.js +115 -0
- data/third_party/closure-library/closure/goog/style/cursor_test.html +132 -0
- data/third_party/closure-library/closure/goog/style/style.js +2087 -0
- data/third_party/closure-library/closure/goog/style/style_quirks_test.html +530 -0
- data/third_party/closure-library/closure/goog/style/style_test.html +518 -0
- data/third_party/closure-library/closure/goog/style/style_test.js +2602 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_quirk.html +27 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
- data/third_party/closure-library/closure/goog/style/style_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/style/style_test_standard.html +11 -0
- data/third_party/closure-library/closure/goog/style/style_webkit_scrollbars_test.html +79 -0
- data/third_party/closure-library/closure/goog/style/stylescrollbartester.js +78 -0
- data/third_party/closure-library/closure/goog/style/transition.js +138 -0
- data/third_party/closure-library/closure/goog/style/transition_test.html +124 -0
- data/third_party/closure-library/closure/goog/testing/asserts.js +1243 -0
- data/third_party/closure-library/closure/goog/testing/asserts_test.html +1150 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase.js +824 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_test.html +58 -0
- data/third_party/closure-library/closure/goog/testing/benchmark.js +88 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase.js +689 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase_test.html +352 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase.js +155 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase_test.html +140 -0
- data/third_party/closure-library/closure/goog/testing/dom.js +608 -0
- data/third_party/closure-library/closure/goog/testing/dom_test.html +438 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom.js +293 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
- data/third_party/closure-library/closure/goog/testing/editor/fieldmock.js +99 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper.js +176 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper_test.html +177 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver.js +86 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
- data/third_party/closure-library/closure/goog/testing/events/events.js +713 -0
- data/third_party/closure-library/closure/goog/testing/events/events_test.html +614 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers.js +41 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler.js +64 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler_test.html +89 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures.js +236 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob.js +116 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob_test.html +65 -0
- data/third_party/closure-library/closure/goog/testing/fs/directoryentry_test.html +313 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry.js +621 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry_test.html +227 -0
- data/third_party/closure-library/closure/goog/testing/fs/file.js +52 -0
- data/third_party/closure-library/closure/goog/testing/fs/fileentry_test.html +93 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader.js +272 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader_test.html +236 -0
- data/third_party/closure-library/closure/goog/testing/fs/filesystem.js +63 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter.js +261 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter_test.html +325 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs.js +147 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs_test.html +53 -0
- data/third_party/closure-library/closure/goog/testing/fs/integration_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/fs/progressevent.js +81 -0
- data/third_party/closure-library/closure/goog/testing/functionmock.js +177 -0
- data/third_party/closure-library/closure/goog/testing/functionmock_test.html +511 -0
- data/third_party/closure-library/closure/goog/testing/graphics.js +64 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts.js +77 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.html +19 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.js +67 -0
- data/third_party/closure-library/closure/goog/testing/jsunit.js +156 -0
- data/third_party/closure-library/closure/goog/testing/loosemock.js +240 -0
- data/third_party/closure-library/closure/goog/testing/loosemock_test.html +343 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +79 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageport.js +85 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockportnetwork.js +65 -0
- data/third_party/closure-library/closure/goog/testing/mock.js +619 -0
- data/third_party/closure-library/closure/goog/testing/mock_test.html +264 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory.js +578 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
- data/third_party/closure-library/closure/goog/testing/mockclock.js +520 -0
- data/third_party/closure-library/closure/goog/testing/mockclock_test.html +504 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol.js +219 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
- data/third_party/closure-library/closure/goog/testing/mockinterface.js +45 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers.js +395 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom.js +126 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
- data/third_party/closure-library/closure/goog/testing/mockrange.js +66 -0
- data/third_party/closure-library/closure/goog/testing/mockrange_test.html +41 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage.js +107 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage_test.html +78 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent.js +141 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
- data/third_party/closure-library/closure/goog/testing/multitestrunner.js +1439 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio.js +709 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio_test.html +384 -0
- data/third_party/closure-library/closure/goog/testing/net/xhriopool.js +64 -0
- data/third_party/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.css +46 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.js +190 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer.js +405 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer_test.html +201 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2.js +127 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2_test.html +117 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom.js +179 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction.js +201 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction_test.html +159 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase.js +122 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase_test.html +34 -0
- data/third_party/closure-library/closure/goog/testing/singleton.js +46 -0
- data/third_party/closure-library/closure/goog/testing/singleton_test.html +39 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace.js +555 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace_test.html +327 -0
- data/third_party/closure-library/closure/goog/testing/storage/fakemechanism.js +66 -0
- data/third_party/closure-library/closure/goog/testing/strictmock.js +128 -0
- data/third_party/closure-library/closure/goog/testing/strictmock_test.html +412 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts.js +310 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
- data/third_party/closure-library/closure/goog/testing/style/style.js +101 -0
- data/third_party/closure-library/closure/goog/testing/style/style_test.html +162 -0
- data/third_party/closure-library/closure/goog/testing/testcase.js +1233 -0
- data/third_party/closure-library/closure/goog/testing/testqueue.js +66 -0
- data/third_party/closure-library/closure/goog/testing/testrunner.js +399 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts.js +56 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts_test.html +52 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererharness.js +176 -0
- data/third_party/closure-library/closure/goog/testing/ui/style.js +137 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_test.html +130 -0
- data/third_party/closure-library/closure/goog/timer/timer.js +291 -0
- data/third_party/closure-library/closure/goog/timer/timer_test.html +118 -0
- data/third_party/closure-library/closure/goog/tweak/entries.js +997 -0
- data/third_party/closure-library/closure/goog/tweak/entries_test.html +94 -0
- data/third_party/closure-library/closure/goog/tweak/registry.js +310 -0
- data/third_party/closure-library/closure/goog/tweak/registry_test.html +145 -0
- data/third_party/closure-library/closure/goog/tweak/testhelpers.js +119 -0
- data/third_party/closure-library/closure/goog/tweak/tweak.js +301 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui.js +817 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
- data/third_party/closure-library/closure/goog/ui/abstractspellchecker.js +1138 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac.js +50 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac_test.html +204 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher.js +162 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher_test.html +130 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete.js +919 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete_test.html +1613 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler.js +1308 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler_test.html +685 -0
- data/third_party/closure-library/closure/goog/ui/ac/remote.js +114 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher.js +271 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer.js +1023 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer_test.html +606 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderoptions.js +80 -0
- data/third_party/closure-library/closure/goog/ui/ac/richinputhandler.js +58 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremote.js +107 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremotearraymatcher.js +125 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor.js +347 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor_test.html +150 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip.js +366 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip_test.html +296 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy.js +199 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy_test.html +139 -0
- data/third_party/closure-library/closure/goog/ui/attachablemenu.js +473 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput.js +178 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput_test.html +131 -0
- data/third_party/closure-library/closure/goog/ui/bubble.js +472 -0
- data/third_party/closure-library/closure/goog/ui/button.js +213 -0
- data/third_party/closure-library/closure/goog/ui/button_perf.html +176 -0
- data/third_party/closure-library/closure/goog/ui/button_test.html +257 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer.js +214 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer_test.html +223 -0
- data/third_party/closure-library/closure/goog/ui/buttonside.js +41 -0
- data/third_party/closure-library/closure/goog/ui/charcounter.js +199 -0
- data/third_party/closure-library/closure/goog/ui/charpicker.js +880 -0
- data/third_party/closure-library/closure/goog/ui/charpicker_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/checkbox.js +269 -0
- data/third_party/closure-library/closure/goog/ui/checkbox_test.html +370 -0
- data/third_party/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
- data/third_party/closure-library/closure/goog/ui/checkboxrenderer.js +171 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
- data/third_party/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
- data/third_party/closure-library/closure/goog/ui/colormenubutton.js +215 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette.js +177 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette_test.html +174 -0
- data/third_party/closure-library/closure/goog/ui/colorpicker.js +344 -0
- data/third_party/closure-library/closure/goog/ui/colorsplitbehavior.js +60 -0
- data/third_party/closure-library/closure/goog/ui/combobox.js +961 -0
- data/third_party/closure-library/closure/goog/ui/combobox_test.html +292 -0
- data/third_party/closure-library/closure/goog/ui/component.js +1300 -0
- data/third_party/closure-library/closure/goog/ui/component_test.html +889 -0
- data/third_party/closure-library/closure/goog/ui/container.js +1322 -0
- data/third_party/closure-library/closure/goog/ui/container_perf.html +55 -0
- data/third_party/closure-library/closure/goog/ui/container_test.html +458 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer.js +371 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer_test.html +228 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller.js +222 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/control.js +1387 -0
- data/third_party/closure-library/closure/goog/ui/control_perf.html +166 -0
- data/third_party/closure-library/closure/goog/ui/control_test.html +2142 -0
- data/third_party/closure-library/closure/goog/ui/controlcontent.js +28 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer.js +855 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer_test.html +1100 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor.js +183 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/css3buttonrenderer.js +152 -0
- data/third_party/closure-library/closure/goog/ui/css3menubuttonrenderer.js +147 -0
- data/third_party/closure-library/closure/goog/ui/cssnames.js +29 -0
- data/third_party/closure-library/closure/goog/ui/custombutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/custombuttonrenderer.js +267 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette.js +139 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
- data/third_party/closure-library/closure/goog/ui/datepicker.js +1369 -0
- data/third_party/closure-library/closure/goog/ui/datepicker_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/datepickerrenderer.js +55 -0
- data/third_party/closure-library/closure/goog/ui/decorate.js +38 -0
- data/third_party/closure-library/closure/goog/ui/decorate_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/defaultdatepickerrenderer.js +202 -0
- data/third_party/closure-library/closure/goog/ui/dialog.js +1556 -0
- data/third_party/closure-library/closure/goog/ui/dialog_test.html +776 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker_test.html +171 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer.js +416 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer_test.html +49 -0
- data/third_party/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow.js +486 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow_test.html +92 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog_test.html +473 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble.js +525 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
- data/third_party/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1065 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditordialog.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditorokevent.js +49 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog.js +1064 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog_test.html +653 -0
- data/third_party/closure-library/closure/goog/ui/editor/messages.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/tabpane.js +198 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarcontroller.js +295 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipalette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +208 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker.js +804 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker_test.html +913 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
- data/third_party/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
- data/third_party/closure-library/closure/goog/ui/equation/arrowpalette.js +47 -0
- data/third_party/closure-library/closure/goog/ui/equation/changeevent.js +37 -0
- data/third_party/closure-library/closure/goog/ui/equation/comparisonpalette.js +56 -0
- data/third_party/closure-library/closure/goog/ui/equation/editorpane.js +93 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditor.js +220 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditordialog.js +137 -0
- data/third_party/closure-library/closure/goog/ui/equation/greekpalette.js +75 -0
- data/third_party/closure-library/closure/goog/ui/equation/imagerenderer.js +190 -0
- data/third_party/closure-library/closure/goog/ui/equation/mathpalette.js +55 -0
- data/third_party/closure-library/closure/goog/ui/equation/menupalette.js +86 -0
- data/third_party/closure-library/closure/goog/ui/equation/palette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/equation/palettemanager.js +203 -0
- data/third_party/closure-library/closure/goog/ui/equation/symbolpalette.js +74 -0
- data/third_party/closure-library/closure/goog/ui/equation/texeditor.js +141 -0
- data/third_party/closure-library/closure/goog/ui/equation/texpane.js +444 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu.js +575 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu_test.html +321 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +62 -0
- data/third_party/closure-library/closure/goog/ui/flatbuttonrenderer.js +146 -0
- data/third_party/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +238 -0
- data/third_party/closure-library/closure/goog/ui/formpost.js +109 -0
- data/third_party/closure-library/closure/goog/ui/formpost_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/gauge.js +1011 -0
- data/third_party/closure-library/closure/goog/ui/gaugetheme.js +169 -0
- data/third_party/closure-library/closure/goog/ui/hovercard.js +456 -0
- data/third_party/closure-library/closure/goog/ui/hovercard_test.html +360 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette.js +298 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette.js +505 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette_test.html +219 -0
- data/third_party/closure-library/closure/goog/ui/idgenerator.js +57 -0
- data/third_party/closure-library/closure/goog/ui/idletimer.js +299 -0
- data/third_party/closure-library/closure/goog/ui/idletimer_test.html +100 -0
- data/third_party/closure-library/closure/goog/ui/iframemask.js +257 -0
- data/third_party/closure-library/closure/goog/ui/iframemask_test.html +230 -0
- data/third_party/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
- data/third_party/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker_test.html +111 -0
- data/third_party/closure-library/closure/goog/ui/itemevent.js +50 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler.js +1017 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +702 -0
- data/third_party/closure-library/closure/goog/ui/labelinput.js +592 -0
- data/third_party/closure-library/closure/goog/ui/labelinput_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject.js +631 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr.js +308 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo.js +281 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/media/media.js +285 -0
- data/third_party/closure-library/closure/goog/ui/media/media_test.html +118 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel.js +960 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel_test.html +108 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3.js +228 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
- data/third_party/closure-library/closure/goog/ui/media/photo.js +142 -0
- data/third_party/closure-library/closure/goog/ui/media/photo_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa.js +321 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa_test.html +121 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo.js +276 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo_test.html +102 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube.js +357 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube_test.html +243 -0
- data/third_party/closure-library/closure/goog/ui/menu.js +476 -0
- data/third_party/closure-library/closure/goog/ui/menu_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/menubar.js +44 -0
- data/third_party/closure-library/closure/goog/ui/menubardecorator.js +35 -0
- data/third_party/closure-library/closure/goog/ui/menubarrenderer.js +74 -0
- data/third_party/closure-library/closure/goog/ui/menubase.js +190 -0
- data/third_party/closure-library/closure/goog/ui/menubutton.js +903 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test.html +637 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer.js +266 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer_test.html +179 -0
- data/third_party/closure-library/closure/goog/ui/menuheader.js +62 -0
- data/third_party/closure-library/closure/goog/ui/menuheaderrenderer.js +54 -0
- data/third_party/closure-library/closure/goog/ui/menuitem.js +233 -0
- data/third_party/closure-library/closure/goog/ui/menuitem_test.html +559 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer.js +358 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer_test.html +201 -0
- data/third_party/closure-library/closure/goog/ui/menurenderer.js +123 -0
- data/third_party/closure-library/closure/goog/ui/menuseparator.js +51 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer.js +113 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer_test.html +61 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor.js +71 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.html +19 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.js +94 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup.js +698 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup_test.html +419 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/offlineinstalldialog.js +1089 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscomponent.js +540 -0
- data/third_party/closure-library/closure/goog/ui/option.js +68 -0
- data/third_party/closure-library/closure/goog/ui/palette.js +598 -0
- data/third_party/closure-library/closure/goog/ui/palette_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer.js +372 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer_test.html +83 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker.js +672 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker_test.html +239 -0
- data/third_party/closure-library/closure/goog/ui/popup.js +344 -0
- data/third_party/closure-library/closure/goog/ui/popup_test.html +137 -0
- data/third_party/closure-library/closure/goog/ui/popupbase.js +822 -0
- data/third_party/closure-library/closure/goog/ui/popupbase_test.html +484 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
- data/third_party/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu.js +557 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu_test.html +308 -0
- data/third_party/closure-library/closure/goog/ui/progressbar.js +401 -0
- data/third_party/closure-library/closure/goog/ui/prompt.js +405 -0
- data/third_party/closure-library/closure/goog/ui/prompt_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel.js +302 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
- data/third_party/closure-library/closure/goog/ui/ratings.js +451 -0
- data/third_party/closure-library/closure/goog/ui/registry.js +167 -0
- data/third_party/closure-library/closure/goog/ui/registry_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker.js +626 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker_test.html +247 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel.js +625 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
- data/third_party/closure-library/closure/goog/ui/roundedtabrenderer.js +197 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater.js +585 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/select.js +434 -0
- data/third_party/closure-library/closure/goog/ui/select_test.html +235 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton.js +299 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel.js +300 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel_test.html +225 -0
- data/third_party/closure-library/closure/goog/ui/separator.js +80 -0
- data/third_party/closure-library/closure/goog/ui/serverchart.js +1837 -0
- data/third_party/closure-library/closure/goog/ui/serverchart_test.html +638 -0
- data/third_party/closure-library/closure/goog/ui/slider.js +126 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase.js +1592 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase_test.html +897 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior.js +340 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
- data/third_party/closure-library/closure/goog/ui/splitpane.js +898 -0
- data/third_party/closure-library/closure/goog/ui/splitpane_test.html +229 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer.js +201 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
- data/third_party/closure-library/closure/goog/ui/submenu.js +667 -0
- data/third_party/closure-library/closure/goog/ui/submenu_test.html +563 -0
- data/third_party/closure-library/closure/goog/ui/submenurenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/tab.js +102 -0
- data/third_party/closure-library/closure/goog/ui/tab_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/tabbar.js +394 -0
- data/third_party/closure-library/closure/goog/ui/tabbar_test.html +612 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer.js +175 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer_test.html +138 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter.js +325 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter_test.html +197 -0
- data/third_party/closure-library/closure/goog/ui/tabpane.js +675 -0
- data/third_party/closure-library/closure/goog/ui/tabpane_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer.js +153 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/textarea.js +577 -0
- data/third_party/closure-library/closure/goog/ui/textarea_test.html +314 -0
- data/third_party/closure-library/closure/goog/ui/textarearenderer.js +169 -0
- data/third_party/closure-library/closure/goog/ui/togglebutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbar.js +46 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbutton.js +55 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubutton.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarrenderer.js +99 -0
- data/third_party/closure-library/closure/goog/ui/toolbarselect.js +56 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparator.js +53 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +91 -0
- data/third_party/closure-library/closure/goog/ui/toolbartogglebutton.js +54 -0
- data/third_party/closure-library/closure/goog/ui/tooltip.js +999 -0
- data/third_party/closure-library/closure/goog/ui/tooltip_test.html +380 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode.js +1458 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode_test.html +232 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol.js +663 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
- data/third_party/closure-library/closure/goog/ui/tree/treenode.js +107 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitem.js +184 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +84 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider.js +157 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider_test.html +39 -0
- data/third_party/closure-library/closure/goog/ui/zippy.js +445 -0
- data/third_party/closure-library/closure/goog/ui/zippy_test.html +315 -0
- data/third_party/closure-library/closure/goog/uri/uri.js +1502 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.html +21 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.js +1048 -0
- data/third_party/closure-library/closure/goog/uri/utils.js +1053 -0
- data/third_party/closure-library/closure/goog/uri/utils_test.html +562 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader.js +90 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/flash.js +153 -0
- data/third_party/closure-library/closure/goog/useragent/flash_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/iphoto.js +87 -0
- data/third_party/closure-library/closure/goog/useragent/jscript.js +95 -0
- data/third_party/closure-library/closure/goog/useragent/jscript_test.html +65 -0
- data/third_party/closure-library/closure/goog/useragent/picasa.js +112 -0
- data/third_party/closure-library/closure/goog/useragent/platform.js +82 -0
- data/third_party/closure-library/closure/goog/useragent/platform_test.html +182 -0
- data/third_party/closure-library/closure/goog/useragent/product.js +253 -0
- data/third_party/closure-library/closure/goog/useragent/product_isversion.js +140 -0
- data/third_party/closure-library/closure/goog/useragent/product_test.html +380 -0
- data/third_party/closure-library/closure/goog/useragent/useragent.js +599 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_quirks_test.html +27 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_test.html +300 -0
- data/third_party/closure-library/closure/goog/vec/float32array.js +110 -0
- data/third_party/closure-library/closure/goog/vec/float32array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/float64array.js +117 -0
- data/third_party/closure-library/closure/goog/vec/float64array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/mat3.js +1211 -0
- data/third_party/closure-library/closure/goog/vec/mat3_test.html +465 -0
- data/third_party/closure-library/closure/goog/vec/mat3d.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3d_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat3f.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3f_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat4.js +1822 -0
- data/third_party/closure-library/closure/goog/vec/mat4_test.html +781 -0
- data/third_party/closure-library/closure/goog/vec/mat4d.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4d_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/mat4f.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4f_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/matrix3.js +720 -0
- data/third_party/closure-library/closure/goog/vec/matrix3_test.html +301 -0
- data/third_party/closure-library/closure/goog/vec/matrix4.js +1405 -0
- data/third_party/closure-library/closure/goog/vec/matrix4_test.html +626 -0
- data/third_party/closure-library/closure/goog/vec/quaternion.js +458 -0
- data/third_party/closure-library/closure/goog/vec/quaternion_test.html +195 -0
- data/third_party/closure-library/closure/goog/vec/ray.js +94 -0
- data/third_party/closure-library/closure/goog/vec/ray_test.html +66 -0
- data/third_party/closure-library/closure/goog/vec/vec.js +73 -0
- data/third_party/closure-library/closure/goog/vec/vec2.js +376 -0
- data/third_party/closure-library/closure/goog/vec/vec2_test.html +216 -0
- data/third_party/closure-library/closure/goog/vec/vec2d.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2d_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec2f.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2f_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec3.js +474 -0
- data/third_party/closure-library/closure/goog/vec/vec3_test.html +258 -0
- data/third_party/closure-library/closure/goog/vec/vec3d.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3d_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec3f.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3f_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec4.js +406 -0
- data/third_party/closure-library/closure/goog/vec/vec4_test.html +192 -0
- data/third_party/closure-library/closure/goog/vec/vec4d.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4d_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec4f.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4f_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec_array_perf.html +443 -0
- data/third_party/closure-library/closure/goog/vec/vec_perf.html +101 -0
- data/third_party/closure-library/closure/goog/webgl/webgl.js +2194 -0
- data/third_party/closure-library/closure/goog/window/window.js +225 -0
- data/third_party/closure-library/closure/goog/window/window_test.html +239 -0
- data/third_party/closure-library/closure/known_issues/testdata/closure_library_warnings.txt +47 -0
- data/third_party/closure-library/third_party/closure/goog/base.js +2 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
- data/third_party/closure-library/third_party/closure/goog/deps.js +20 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query.js +1543 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_compiled_test.html +65 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.html +64 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.js +158 -0
- data/third_party/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +60 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred.js +764 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_async_test.html +144 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +877 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +205 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +504 -0
- data/third_party/closure-library/third_party/closure/goog/osapi/osapi.js +95 -0
- metadata +2054 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<!--
|
|
4
|
+
Copyright 2009 The Closure Library Authors. All Rights Reserved.
|
|
5
|
+
|
|
6
|
+
Use of this source code is governed by the Apache License, Version 2.0.
|
|
7
|
+
See the COPYING file for details.
|
|
8
|
+
-->
|
|
9
|
+
<!--
|
|
10
|
+
Author: dgajda@google.com (Damian Gajda)
|
|
11
|
+
-->
|
|
12
|
+
<head>
|
|
13
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
14
|
+
<title>Closure Unit Tests - goog.style.cursor</title>
|
|
15
|
+
<script src="../base.js"></script>
|
|
16
|
+
<script>
|
|
17
|
+
goog.require('goog.testing.jsunit');
|
|
18
|
+
|
|
19
|
+
goog.require('goog.style.cursor');
|
|
20
|
+
goog.require('goog.userAgent');
|
|
21
|
+
</script>
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
var baseCursorUrl = '/images/2/';
|
|
27
|
+
var origWindowsUserAgentValue;
|
|
28
|
+
var origGeckoUserAgentValue;
|
|
29
|
+
var origWebkitUserAgentValue;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
function setUp() {
|
|
33
|
+
origWindowsUserAgentValue = goog.userAgent.WINDOWS;
|
|
34
|
+
origGeckoUserAgentValue = goog.userAgent.GECKO;
|
|
35
|
+
origWebkitUserAgentValue = goog.userAgent.WEBKIT;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
function tearDown() {
|
|
40
|
+
goog.userAgent.WINDOWS = origWindowsUserAgentValue;
|
|
41
|
+
goog.userAgent.GECKO = origGeckoUserAgentValue;
|
|
42
|
+
goog.userAgent.WEBKIT = origWebkitUserAgentValue;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
function testGetCursorStylesWebkit() {
|
|
47
|
+
goog.userAgent.GECKO = false;
|
|
48
|
+
goog.userAgent.WEBKIT = true;
|
|
49
|
+
|
|
50
|
+
assertEquals('Webkit should get a cursor style with moved hot-spot.',
|
|
51
|
+
'url("/images/2/openhand.cur") 7 5, default',
|
|
52
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl));
|
|
53
|
+
assertEquals('Webkit should get a cursor style with moved hot-spot.',
|
|
54
|
+
'url("/images/2/openhand.cur") 7 5, default',
|
|
55
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl, true));
|
|
56
|
+
|
|
57
|
+
assertEquals('Webkit should get a cursor style with moved hot-spot.',
|
|
58
|
+
'url("/images/2/closedhand.cur") 7 5, move',
|
|
59
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl));
|
|
60
|
+
assertEquals('Webkit should get a cursor style with moved hot-spot.',
|
|
61
|
+
'url("/images/2/closedhand.cur") 7 5, move',
|
|
62
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl, true));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
function testGetCursorStylesFireFoxNonWin() {
|
|
67
|
+
goog.userAgent.GECKO = true;
|
|
68
|
+
goog.userAgent.WEBKIT = false;
|
|
69
|
+
goog.userAgent.WINDOWS = false;
|
|
70
|
+
|
|
71
|
+
assertEquals('FireFox on non Windows should get a custom cursor style.',
|
|
72
|
+
'-moz-grab',
|
|
73
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl));
|
|
74
|
+
assertEquals('FireFox on non Windows should get a custom cursor style and ' +
|
|
75
|
+
'no !important modifier.',
|
|
76
|
+
'-moz-grab',
|
|
77
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl, true));
|
|
78
|
+
|
|
79
|
+
assertEquals('FireFox on non Windows should get a custom cursor style.',
|
|
80
|
+
'-moz-grabbing',
|
|
81
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl));
|
|
82
|
+
assertEquals('FireFox on non Windows should get a custom cursor style and ' +
|
|
83
|
+
'no !important modifier.',
|
|
84
|
+
'-moz-grabbing',
|
|
85
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl, true));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
function testGetCursorStylesFireFoxWin() {
|
|
90
|
+
goog.userAgent.GECKO = true;
|
|
91
|
+
goog.userAgent.WEBKIT = false;
|
|
92
|
+
goog.userAgent.WINDOWS = true;
|
|
93
|
+
|
|
94
|
+
assertEquals('FireFox should get a cursor style with URL.',
|
|
95
|
+
'url("/images/2/openhand.cur"), default',
|
|
96
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl));
|
|
97
|
+
assertEquals('FireFox should get a cursor style with URL and no !important' +
|
|
98
|
+
' modifier.',
|
|
99
|
+
'url("/images/2/openhand.cur"), default',
|
|
100
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl, true));
|
|
101
|
+
|
|
102
|
+
assertEquals('FireFox should get a cursor style with URL.',
|
|
103
|
+
'url("/images/2/closedhand.cur"), move',
|
|
104
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl));
|
|
105
|
+
assertEquals('FireFox should get a cursor style with URL and no !important' +
|
|
106
|
+
' modifier.',
|
|
107
|
+
'url("/images/2/closedhand.cur"), move',
|
|
108
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl, true));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
function testGetCursorStylesOther() {
|
|
113
|
+
goog.userAgent.GECKO = false;
|
|
114
|
+
goog.userAgent.WEBKIT = false;
|
|
115
|
+
|
|
116
|
+
assertEquals('Other browsers (IE) should get a cursor style with URL.',
|
|
117
|
+
'url("/images/2/openhand.cur"), default',
|
|
118
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl));
|
|
119
|
+
assertEquals('Other browsers (IE) should get a cursor style with URL.',
|
|
120
|
+
'url("/images/2/openhand.cur"), default',
|
|
121
|
+
goog.style.cursor.getDraggableCursorStyle(baseCursorUrl, true));
|
|
122
|
+
|
|
123
|
+
assertEquals('Other browsers (IE) should get a cursor style with URL.',
|
|
124
|
+
'url("/images/2/closedhand.cur"), move',
|
|
125
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl));
|
|
126
|
+
assertEquals('Other browsers (IE) should get a cursor style with URL.',
|
|
127
|
+
'url("/images/2/closedhand.cur"), move',
|
|
128
|
+
goog.style.cursor.getDraggingCursorStyle(baseCursorUrl, true));
|
|
129
|
+
}
|
|
130
|
+
</script>
|
|
131
|
+
</body>
|
|
132
|
+
</html>
|
|
@@ -0,0 +1,2087 @@
|
|
|
1
|
+
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS-IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @fileoverview Utilities for element styles.
|
|
17
|
+
*
|
|
18
|
+
* @see ../demos/inline_block_quirks.html
|
|
19
|
+
* @see ../demos/inline_block_standards.html
|
|
20
|
+
* @see ../demos/style_viewport.html
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
goog.provide('goog.style');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
goog.require('goog.array');
|
|
27
|
+
goog.require('goog.asserts');
|
|
28
|
+
goog.require('goog.dom');
|
|
29
|
+
goog.require('goog.dom.NodeType');
|
|
30
|
+
goog.require('goog.dom.vendor');
|
|
31
|
+
goog.require('goog.math.Box');
|
|
32
|
+
goog.require('goog.math.Coordinate');
|
|
33
|
+
goog.require('goog.math.Rect');
|
|
34
|
+
goog.require('goog.math.Size');
|
|
35
|
+
goog.require('goog.object');
|
|
36
|
+
goog.require('goog.string');
|
|
37
|
+
goog.require('goog.userAgent');
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @define {boolean} Whether we know at compile time that
|
|
42
|
+
* getBoundingClientRect() is present and bug-free on the browser.
|
|
43
|
+
*/
|
|
44
|
+
goog.define('goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS', false);
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Sets a style value on an element.
|
|
49
|
+
*
|
|
50
|
+
* This function is not indended to patch issues in the browser's style
|
|
51
|
+
* handling, but to allow easy programmatic access to setting dash-separated
|
|
52
|
+
* style properties. An example is setting a batch of properties from a data
|
|
53
|
+
* object without overwriting old styles. When possible, use native APIs:
|
|
54
|
+
* elem.style.propertyKey = 'value' or (if obliterating old styles is fine)
|
|
55
|
+
* elem.style.cssText = 'property1: value1; property2: value2'.
|
|
56
|
+
*
|
|
57
|
+
* @param {Element} element The element to change.
|
|
58
|
+
* @param {string|Object} style If a string, a style name. If an object, a hash
|
|
59
|
+
* of style names to style values.
|
|
60
|
+
* @param {string|number|boolean=} opt_value If style was a string, then this
|
|
61
|
+
* should be the value.
|
|
62
|
+
*/
|
|
63
|
+
goog.style.setStyle = function(element, style, opt_value) {
|
|
64
|
+
if (goog.isString(style)) {
|
|
65
|
+
goog.style.setStyle_(element, opt_value, style);
|
|
66
|
+
} else {
|
|
67
|
+
goog.object.forEach(style, goog.partial(goog.style.setStyle_, element));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Sets a style value on an element, with parameters swapped to work with
|
|
74
|
+
* {@code goog.object.forEach()}. Prepends a vendor-specific prefix when
|
|
75
|
+
* necessary.
|
|
76
|
+
* @param {Element} element The element to change.
|
|
77
|
+
* @param {string|number|boolean|undefined} value Style value.
|
|
78
|
+
* @param {string} style Style name.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
goog.style.setStyle_ = function(element, value, style) {
|
|
82
|
+
var propertyName = goog.style.getVendorJsStyleName_(element, style);
|
|
83
|
+
|
|
84
|
+
if (propertyName) {
|
|
85
|
+
element.style[propertyName] = value;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Returns the style property name in camel-case. If it does not exist and a
|
|
92
|
+
* vendor-specific version of the property does exist, then return the vendor-
|
|
93
|
+
* specific property name instead.
|
|
94
|
+
* @param {Element} element The element to change.
|
|
95
|
+
* @param {string} style Style name.
|
|
96
|
+
* @return {string} Vendor-specific style.
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
goog.style.getVendorJsStyleName_ = function(element, style) {
|
|
100
|
+
var camelStyle = goog.string.toCamelCase(style);
|
|
101
|
+
|
|
102
|
+
if (element.style[camelStyle] === undefined) {
|
|
103
|
+
var prefixedStyle = goog.dom.vendor.getVendorJsPrefix() +
|
|
104
|
+
goog.string.toTitleCase(style);
|
|
105
|
+
|
|
106
|
+
if (element.style[prefixedStyle] !== undefined) {
|
|
107
|
+
return prefixedStyle;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return camelStyle;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns the style property name in CSS notation. If it does not exist and a
|
|
117
|
+
* vendor-specific version of the property does exist, then return the vendor-
|
|
118
|
+
* specific property name instead.
|
|
119
|
+
* @param {Element} element The element to change.
|
|
120
|
+
* @param {string} style Style name.
|
|
121
|
+
* @return {string} Vendor-specific style.
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
goog.style.getVendorStyleName_ = function(element, style) {
|
|
125
|
+
var camelStyle = goog.string.toCamelCase(style);
|
|
126
|
+
|
|
127
|
+
if (element.style[camelStyle] === undefined) {
|
|
128
|
+
var prefixedStyle = goog.dom.vendor.getVendorJsPrefix() +
|
|
129
|
+
goog.string.toTitleCase(style);
|
|
130
|
+
|
|
131
|
+
if (element.style[prefixedStyle] !== undefined) {
|
|
132
|
+
return goog.dom.vendor.getVendorPrefix() + '-' + style;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return style;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Retrieves an explicitly-set style value of a node. This returns '' if there
|
|
142
|
+
* isn't a style attribute on the element or if this style property has not been
|
|
143
|
+
* explicitly set in script.
|
|
144
|
+
*
|
|
145
|
+
* @param {Element} element Element to get style of.
|
|
146
|
+
* @param {string} property Property to get, css-style (if you have a camel-case
|
|
147
|
+
* property, use element.style[style]).
|
|
148
|
+
* @return {string} Style value.
|
|
149
|
+
*/
|
|
150
|
+
goog.style.getStyle = function(element, property) {
|
|
151
|
+
// element.style is '' for well-known properties which are unset.
|
|
152
|
+
// For for browser specific styles as 'filter' is undefined
|
|
153
|
+
// so we need to return '' explicitly to make it consistent across
|
|
154
|
+
// browsers.
|
|
155
|
+
var styleValue = element.style[goog.string.toCamelCase(property)];
|
|
156
|
+
|
|
157
|
+
// Using typeof here because of a bug in Safari 5.1, where this value
|
|
158
|
+
// was undefined, but === undefined returned false.
|
|
159
|
+
if (typeof(styleValue) !== 'undefined') {
|
|
160
|
+
return styleValue;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return element.style[goog.style.getVendorJsStyleName_(element, property)] ||
|
|
164
|
+
'';
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Retrieves a computed style value of a node. It returns empty string if the
|
|
170
|
+
* value cannot be computed (which will be the case in Internet Explorer) or
|
|
171
|
+
* "none" if the property requested is an SVG one and it has not been
|
|
172
|
+
* explicitly set (firefox and webkit).
|
|
173
|
+
*
|
|
174
|
+
* @param {Element} element Element to get style of.
|
|
175
|
+
* @param {string} property Property to get (camel-case).
|
|
176
|
+
* @return {string} Style value.
|
|
177
|
+
*/
|
|
178
|
+
goog.style.getComputedStyle = function(element, property) {
|
|
179
|
+
var doc = goog.dom.getOwnerDocument(element);
|
|
180
|
+
if (doc.defaultView && doc.defaultView.getComputedStyle) {
|
|
181
|
+
var styles = doc.defaultView.getComputedStyle(element, null);
|
|
182
|
+
if (styles) {
|
|
183
|
+
// element.style[..] is undefined for browser specific styles
|
|
184
|
+
// as 'filter'.
|
|
185
|
+
return styles[property] || styles.getPropertyValue(property) || '';
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return '';
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Gets the cascaded style value of a node, or null if the value cannot be
|
|
195
|
+
* computed (only Internet Explorer can do this).
|
|
196
|
+
*
|
|
197
|
+
* @param {Element} element Element to get style of.
|
|
198
|
+
* @param {string} style Property to get (camel-case).
|
|
199
|
+
* @return {string} Style value.
|
|
200
|
+
*/
|
|
201
|
+
goog.style.getCascadedStyle = function(element, style) {
|
|
202
|
+
// TODO(nicksantos): This should be documented to return null. #fixTypes
|
|
203
|
+
return element.currentStyle ? element.currentStyle[style] : null;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Cross-browser pseudo get computed style. It returns the computed style where
|
|
209
|
+
* available. If not available it tries the cascaded style value (IE
|
|
210
|
+
* currentStyle) and in worst case the inline style value. It shouldn't be
|
|
211
|
+
* called directly, see http://wiki/Main/ComputedStyleVsCascadedStyle for
|
|
212
|
+
* discussion.
|
|
213
|
+
*
|
|
214
|
+
* @param {Element} element Element to get style of.
|
|
215
|
+
* @param {string} style Property to get (must be camelCase, not css-style.).
|
|
216
|
+
* @return {string} Style value.
|
|
217
|
+
* @private
|
|
218
|
+
*/
|
|
219
|
+
goog.style.getStyle_ = function(element, style) {
|
|
220
|
+
return goog.style.getComputedStyle(element, style) ||
|
|
221
|
+
goog.style.getCascadedStyle(element, style) ||
|
|
222
|
+
(element.style && element.style[style]);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Retrieves the computed value of the position CSS attribute.
|
|
228
|
+
* @param {Element} element The element to get the position of.
|
|
229
|
+
* @return {string} Position value.
|
|
230
|
+
*/
|
|
231
|
+
goog.style.getComputedPosition = function(element) {
|
|
232
|
+
return goog.style.getStyle_(element, 'position');
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Retrieves the computed background color string for a given element. The
|
|
238
|
+
* string returned is suitable for assigning to another element's
|
|
239
|
+
* background-color, but is not guaranteed to be in any particular string
|
|
240
|
+
* format. Accessing the color in a numeric form may not be possible in all
|
|
241
|
+
* browsers or with all input.
|
|
242
|
+
*
|
|
243
|
+
* If the background color for the element is defined as a hexadecimal value,
|
|
244
|
+
* the resulting string can be parsed by goog.color.parse in all supported
|
|
245
|
+
* browsers.
|
|
246
|
+
*
|
|
247
|
+
* Whether named colors like "red" or "lightblue" get translated into a
|
|
248
|
+
* format which can be parsed is browser dependent. Calling this function on
|
|
249
|
+
* transparent elements will return "transparent" in most browsers or
|
|
250
|
+
* "rgba(0, 0, 0, 0)" in WebKit.
|
|
251
|
+
* @param {Element} element The element to get the background color of.
|
|
252
|
+
* @return {string} The computed string value of the background color.
|
|
253
|
+
*/
|
|
254
|
+
goog.style.getBackgroundColor = function(element) {
|
|
255
|
+
return goog.style.getStyle_(element, 'backgroundColor');
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Retrieves the computed value of the overflow-x CSS attribute.
|
|
261
|
+
* @param {Element} element The element to get the overflow-x of.
|
|
262
|
+
* @return {string} The computed string value of the overflow-x attribute.
|
|
263
|
+
*/
|
|
264
|
+
goog.style.getComputedOverflowX = function(element) {
|
|
265
|
+
return goog.style.getStyle_(element, 'overflowX');
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Retrieves the computed value of the overflow-y CSS attribute.
|
|
271
|
+
* @param {Element} element The element to get the overflow-y of.
|
|
272
|
+
* @return {string} The computed string value of the overflow-y attribute.
|
|
273
|
+
*/
|
|
274
|
+
goog.style.getComputedOverflowY = function(element) {
|
|
275
|
+
return goog.style.getStyle_(element, 'overflowY');
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Retrieves the computed value of the z-index CSS attribute.
|
|
281
|
+
* @param {Element} element The element to get the z-index of.
|
|
282
|
+
* @return {string|number} The computed value of the z-index attribute.
|
|
283
|
+
*/
|
|
284
|
+
goog.style.getComputedZIndex = function(element) {
|
|
285
|
+
return goog.style.getStyle_(element, 'zIndex');
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Retrieves the computed value of the text-align CSS attribute.
|
|
291
|
+
* @param {Element} element The element to get the text-align of.
|
|
292
|
+
* @return {string} The computed string value of the text-align attribute.
|
|
293
|
+
*/
|
|
294
|
+
goog.style.getComputedTextAlign = function(element) {
|
|
295
|
+
return goog.style.getStyle_(element, 'textAlign');
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Retrieves the computed value of the cursor CSS attribute.
|
|
301
|
+
* @param {Element} element The element to get the cursor of.
|
|
302
|
+
* @return {string} The computed string value of the cursor attribute.
|
|
303
|
+
*/
|
|
304
|
+
goog.style.getComputedCursor = function(element) {
|
|
305
|
+
return goog.style.getStyle_(element, 'cursor');
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Sets the top/left values of an element. If no unit is specified in the
|
|
311
|
+
* argument then it will add px. The second argument is required if the first
|
|
312
|
+
* argument is a string or number and is ignored if the first argument
|
|
313
|
+
* is a coordinate.
|
|
314
|
+
* @param {Element} el Element to move.
|
|
315
|
+
* @param {string|number|goog.math.Coordinate} arg1 Left position or coordinate.
|
|
316
|
+
* @param {string|number=} opt_arg2 Top position.
|
|
317
|
+
*/
|
|
318
|
+
goog.style.setPosition = function(el, arg1, opt_arg2) {
|
|
319
|
+
var x, y;
|
|
320
|
+
var buggyGeckoSubPixelPos = goog.userAgent.GECKO &&
|
|
321
|
+
(goog.userAgent.MAC || goog.userAgent.X11) &&
|
|
322
|
+
goog.userAgent.isVersionOrHigher('1.9');
|
|
323
|
+
|
|
324
|
+
if (arg1 instanceof goog.math.Coordinate) {
|
|
325
|
+
x = arg1.x;
|
|
326
|
+
y = arg1.y;
|
|
327
|
+
} else {
|
|
328
|
+
x = arg1;
|
|
329
|
+
y = opt_arg2;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Round to the nearest pixel for buggy sub-pixel support.
|
|
333
|
+
el.style.left = goog.style.getPixelStyleValue_(
|
|
334
|
+
/** @type {number|string} */ (x), buggyGeckoSubPixelPos);
|
|
335
|
+
el.style.top = goog.style.getPixelStyleValue_(
|
|
336
|
+
/** @type {number|string} */ (y), buggyGeckoSubPixelPos);
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Gets the offsetLeft and offsetTop properties of an element and returns them
|
|
342
|
+
* in a Coordinate object
|
|
343
|
+
* @param {Element} element Element.
|
|
344
|
+
* @return {!goog.math.Coordinate} The position.
|
|
345
|
+
*/
|
|
346
|
+
goog.style.getPosition = function(element) {
|
|
347
|
+
return new goog.math.Coordinate(element.offsetLeft, element.offsetTop);
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Returns the viewport element for a particular document
|
|
353
|
+
* @param {Node=} opt_node DOM node (Document is OK) to get the viewport element
|
|
354
|
+
* of.
|
|
355
|
+
* @return {Element} document.documentElement or document.body.
|
|
356
|
+
*/
|
|
357
|
+
goog.style.getClientViewportElement = function(opt_node) {
|
|
358
|
+
var doc;
|
|
359
|
+
if (opt_node) {
|
|
360
|
+
doc = goog.dom.getOwnerDocument(opt_node);
|
|
361
|
+
} else {
|
|
362
|
+
doc = goog.dom.getDocument();
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// In old IE versions the document.body represented the viewport
|
|
366
|
+
if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9) &&
|
|
367
|
+
!goog.dom.getDomHelper(doc).isCss1CompatMode()) {
|
|
368
|
+
return doc.body;
|
|
369
|
+
}
|
|
370
|
+
return doc.documentElement;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Calculates the viewport coordinates relative to the page/document
|
|
376
|
+
* containing the node. The viewport may be the browser viewport for
|
|
377
|
+
* non-iframe document, or the iframe container for iframe'd document.
|
|
378
|
+
* @param {!Document} doc The document to use as the reference point.
|
|
379
|
+
* @return {!goog.math.Coordinate} The page offset of the viewport.
|
|
380
|
+
*/
|
|
381
|
+
goog.style.getViewportPageOffset = function(doc) {
|
|
382
|
+
var body = doc.body;
|
|
383
|
+
var documentElement = doc.documentElement;
|
|
384
|
+
var scrollLeft = body.scrollLeft || documentElement.scrollLeft;
|
|
385
|
+
var scrollTop = body.scrollTop || documentElement.scrollTop;
|
|
386
|
+
return new goog.math.Coordinate(scrollLeft, scrollTop);
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Gets the client rectangle of the DOM element.
|
|
392
|
+
*
|
|
393
|
+
* getBoundingClientRect is part of a new CSS object model draft (with a
|
|
394
|
+
* long-time presence in IE), replacing the error-prone parent offset
|
|
395
|
+
* computation and the now-deprecated Gecko getBoxObjectFor.
|
|
396
|
+
*
|
|
397
|
+
* This utility patches common browser bugs in getBoundingClientRect. It
|
|
398
|
+
* will fail if getBoundingClientRect is unsupported.
|
|
399
|
+
*
|
|
400
|
+
* If the element is not in the DOM, the result is undefined, and an error may
|
|
401
|
+
* be thrown depending on user agent.
|
|
402
|
+
*
|
|
403
|
+
* @param {!Element} el The element whose bounding rectangle is being queried.
|
|
404
|
+
* @return {Object} A native bounding rectangle with numerical left, top,
|
|
405
|
+
* right, and bottom. Reported by Firefox to be of object type ClientRect.
|
|
406
|
+
* @private
|
|
407
|
+
*/
|
|
408
|
+
goog.style.getBoundingClientRect_ = function(el) {
|
|
409
|
+
var rect;
|
|
410
|
+
try {
|
|
411
|
+
rect = el.getBoundingClientRect();
|
|
412
|
+
} catch (e) {
|
|
413
|
+
// In IE < 9, calling getBoundingClientRect on an orphan element raises an
|
|
414
|
+
// "Unspecified Error". All other browsers return zeros.
|
|
415
|
+
return {'left': 0, 'top': 0, 'right': 0, 'bottom': 0};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Patch the result in IE only, so that this function can be inlined if
|
|
419
|
+
// compiled for non-IE.
|
|
420
|
+
if (goog.userAgent.IE) {
|
|
421
|
+
|
|
422
|
+
// In IE, most of the time, 2 extra pixels are added to the top and left
|
|
423
|
+
// due to the implicit 2-pixel inset border. In IE6/7 quirks mode and
|
|
424
|
+
// IE6 standards mode, this border can be overridden by setting the
|
|
425
|
+
// document element's border to zero -- thus, we cannot rely on the
|
|
426
|
+
// offset always being 2 pixels.
|
|
427
|
+
|
|
428
|
+
// In quirks mode, the offset can be determined by querying the body's
|
|
429
|
+
// clientLeft/clientTop, but in standards mode, it is found by querying
|
|
430
|
+
// the document element's clientLeft/clientTop. Since we already called
|
|
431
|
+
// getBoundingClientRect we have already forced a reflow, so it is not
|
|
432
|
+
// too expensive just to query them all.
|
|
433
|
+
|
|
434
|
+
// See: http://msdn.microsoft.com/en-us/library/ms536433(VS.85).aspx
|
|
435
|
+
var doc = el.ownerDocument;
|
|
436
|
+
rect.left -= doc.documentElement.clientLeft + doc.body.clientLeft;
|
|
437
|
+
rect.top -= doc.documentElement.clientTop + doc.body.clientTop;
|
|
438
|
+
}
|
|
439
|
+
return /** @type {Object} */ (rect);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Returns the first parent that could affect the position of a given element.
|
|
445
|
+
* @param {Element} element The element to get the offset parent for.
|
|
446
|
+
* @return {Element} The first offset parent or null if one cannot be found.
|
|
447
|
+
*/
|
|
448
|
+
goog.style.getOffsetParent = function(element) {
|
|
449
|
+
// element.offsetParent does the right thing in IE7 and below. In other
|
|
450
|
+
// browsers it only includes elements with position absolute, relative or
|
|
451
|
+
// fixed, not elements with overflow set to auto or scroll.
|
|
452
|
+
if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8)) {
|
|
453
|
+
return element.offsetParent;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
var doc = goog.dom.getOwnerDocument(element);
|
|
457
|
+
var positionStyle = goog.style.getStyle_(element, 'position');
|
|
458
|
+
var skipStatic = positionStyle == 'fixed' || positionStyle == 'absolute';
|
|
459
|
+
for (var parent = element.parentNode; parent && parent != doc;
|
|
460
|
+
parent = parent.parentNode) {
|
|
461
|
+
positionStyle =
|
|
462
|
+
goog.style.getStyle_(/** @type {!Element} */ (parent), 'position');
|
|
463
|
+
skipStatic = skipStatic && positionStyle == 'static' &&
|
|
464
|
+
parent != doc.documentElement && parent != doc.body;
|
|
465
|
+
if (!skipStatic && (parent.scrollWidth > parent.clientWidth ||
|
|
466
|
+
parent.scrollHeight > parent.clientHeight ||
|
|
467
|
+
positionStyle == 'fixed' ||
|
|
468
|
+
positionStyle == 'absolute' ||
|
|
469
|
+
positionStyle == 'relative')) {
|
|
470
|
+
return /** @type {!Element} */ (parent);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
return null;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Calculates and returns the visible rectangle for a given element. Returns a
|
|
479
|
+
* box describing the visible portion of the nearest scrollable offset ancestor.
|
|
480
|
+
* Coordinates are given relative to the document.
|
|
481
|
+
*
|
|
482
|
+
* @param {Element} element Element to get the visible rect for.
|
|
483
|
+
* @return {goog.math.Box} Bounding elementBox describing the visible rect or
|
|
484
|
+
* null if scrollable ancestor isn't inside the visible viewport.
|
|
485
|
+
*/
|
|
486
|
+
goog.style.getVisibleRectForElement = function(element) {
|
|
487
|
+
var visibleRect = new goog.math.Box(0, Infinity, Infinity, 0);
|
|
488
|
+
var dom = goog.dom.getDomHelper(element);
|
|
489
|
+
var body = dom.getDocument().body;
|
|
490
|
+
var documentElement = dom.getDocument().documentElement;
|
|
491
|
+
var scrollEl = dom.getDocumentScrollElement();
|
|
492
|
+
|
|
493
|
+
// Determine the size of the visible rect by climbing the dom accounting for
|
|
494
|
+
// all scrollable containers.
|
|
495
|
+
for (var el = element; el = goog.style.getOffsetParent(el); ) {
|
|
496
|
+
// clientWidth is zero for inline block elements in IE.
|
|
497
|
+
// on WEBKIT, body element can have clientHeight = 0 and scrollHeight > 0
|
|
498
|
+
if ((!goog.userAgent.IE || el.clientWidth != 0) &&
|
|
499
|
+
(!goog.userAgent.WEBKIT || el.clientHeight != 0 || el != body) &&
|
|
500
|
+
// body may have overflow set on it, yet we still get the entire
|
|
501
|
+
// viewport. In some browsers, el.offsetParent may be
|
|
502
|
+
// document.documentElement, so check for that too.
|
|
503
|
+
(el != body && el != documentElement &&
|
|
504
|
+
goog.style.getStyle_(el, 'overflow') != 'visible')) {
|
|
505
|
+
var pos = goog.style.getPageOffset(el);
|
|
506
|
+
var client = goog.style.getClientLeftTop(el);
|
|
507
|
+
pos.x += client.x;
|
|
508
|
+
pos.y += client.y;
|
|
509
|
+
|
|
510
|
+
visibleRect.top = Math.max(visibleRect.top, pos.y);
|
|
511
|
+
visibleRect.right = Math.min(visibleRect.right,
|
|
512
|
+
pos.x + el.clientWidth);
|
|
513
|
+
visibleRect.bottom = Math.min(visibleRect.bottom,
|
|
514
|
+
pos.y + el.clientHeight);
|
|
515
|
+
visibleRect.left = Math.max(visibleRect.left, pos.x);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// Clip by window's viewport.
|
|
520
|
+
var scrollX = scrollEl.scrollLeft, scrollY = scrollEl.scrollTop;
|
|
521
|
+
visibleRect.left = Math.max(visibleRect.left, scrollX);
|
|
522
|
+
visibleRect.top = Math.max(visibleRect.top, scrollY);
|
|
523
|
+
var winSize = dom.getViewportSize();
|
|
524
|
+
visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width);
|
|
525
|
+
visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height);
|
|
526
|
+
return visibleRect.top >= 0 && visibleRect.left >= 0 &&
|
|
527
|
+
visibleRect.bottom > visibleRect.top &&
|
|
528
|
+
visibleRect.right > visibleRect.left ?
|
|
529
|
+
visibleRect : null;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Calculate the scroll position of {@code container} with the minimum amount so
|
|
535
|
+
* that the content and the borders of the given {@code element} become visible.
|
|
536
|
+
* If the element is bigger than the container, its top left corner will be
|
|
537
|
+
* aligned as close to the container's top left corner as possible.
|
|
538
|
+
*
|
|
539
|
+
* @param {Element} element The element to make visible.
|
|
540
|
+
* @param {Element} container The container to scroll.
|
|
541
|
+
* @param {boolean=} opt_center Whether to center the element in the container.
|
|
542
|
+
* Defaults to false.
|
|
543
|
+
* @return {!goog.math.Coordinate} The new scroll position of the container,
|
|
544
|
+
* in form of goog.math.Coordinate(scrollLeft, scrollTop).
|
|
545
|
+
*/
|
|
546
|
+
goog.style.getContainerOffsetToScrollInto =
|
|
547
|
+
function(element, container, opt_center) {
|
|
548
|
+
// Absolute position of the element's border's top left corner.
|
|
549
|
+
var elementPos = goog.style.getPageOffset(element);
|
|
550
|
+
// Absolute position of the container's border's top left corner.
|
|
551
|
+
var containerPos = goog.style.getPageOffset(container);
|
|
552
|
+
var containerBorder = goog.style.getBorderBox(container);
|
|
553
|
+
// Relative pos. of the element's border box to the container's content box.
|
|
554
|
+
var relX = elementPos.x - containerPos.x - containerBorder.left;
|
|
555
|
+
var relY = elementPos.y - containerPos.y - containerBorder.top;
|
|
556
|
+
// How much the element can move in the container, i.e. the difference between
|
|
557
|
+
// the element's bottom-right-most and top-left-most position where it's
|
|
558
|
+
// fully visible.
|
|
559
|
+
var spaceX = container.clientWidth - element.offsetWidth;
|
|
560
|
+
var spaceY = container.clientHeight - element.offsetHeight;
|
|
561
|
+
|
|
562
|
+
var scrollLeft = container.scrollLeft;
|
|
563
|
+
var scrollTop = container.scrollTop;
|
|
564
|
+
if (opt_center) {
|
|
565
|
+
// All browsers round non-integer scroll positions down.
|
|
566
|
+
scrollLeft += relX - spaceX / 2;
|
|
567
|
+
scrollTop += relY - spaceY / 2;
|
|
568
|
+
} else {
|
|
569
|
+
// This formula was designed to give the correct scroll values in the
|
|
570
|
+
// following cases:
|
|
571
|
+
// - element is higher than container (spaceY < 0) => scroll down by relY
|
|
572
|
+
// - element is not higher that container (spaceY >= 0):
|
|
573
|
+
// - it is above container (relY < 0) => scroll up by abs(relY)
|
|
574
|
+
// - it is below container (relY > spaceY) => scroll down by relY - spaceY
|
|
575
|
+
// - it is in the container => don't scroll
|
|
576
|
+
scrollLeft += Math.min(relX, Math.max(relX - spaceX, 0));
|
|
577
|
+
scrollTop += Math.min(relY, Math.max(relY - spaceY, 0));
|
|
578
|
+
}
|
|
579
|
+
return new goog.math.Coordinate(scrollLeft, scrollTop);
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Changes the scroll position of {@code container} with the minimum amount so
|
|
585
|
+
* that the content and the borders of the given {@code element} become visible.
|
|
586
|
+
* If the element is bigger than the container, its top left corner will be
|
|
587
|
+
* aligned as close to the container's top left corner as possible.
|
|
588
|
+
*
|
|
589
|
+
* @param {Element} element The element to make visible.
|
|
590
|
+
* @param {Element} container The container to scroll.
|
|
591
|
+
* @param {boolean=} opt_center Whether to center the element in the container.
|
|
592
|
+
* Defaults to false.
|
|
593
|
+
*/
|
|
594
|
+
goog.style.scrollIntoContainerView = function(element, container, opt_center) {
|
|
595
|
+
var offset =
|
|
596
|
+
goog.style.getContainerOffsetToScrollInto(element, container, opt_center);
|
|
597
|
+
container.scrollLeft = offset.x;
|
|
598
|
+
container.scrollTop = offset.y;
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Returns clientLeft (width of the left border and, if the directionality is
|
|
604
|
+
* right to left, the vertical scrollbar) and clientTop as a coordinate object.
|
|
605
|
+
*
|
|
606
|
+
* @param {Element} el Element to get clientLeft for.
|
|
607
|
+
* @return {!goog.math.Coordinate} Client left and top.
|
|
608
|
+
*/
|
|
609
|
+
goog.style.getClientLeftTop = function(el) {
|
|
610
|
+
// NOTE(eae): Gecko prior to 1.9 doesn't support clientTop/Left, see
|
|
611
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=111207
|
|
612
|
+
if (goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher('1.9')) {
|
|
613
|
+
var left = parseFloat(goog.style.getComputedStyle(el, 'borderLeftWidth'));
|
|
614
|
+
if (goog.style.isRightToLeft(el)) {
|
|
615
|
+
var scrollbarWidth = el.offsetWidth - el.clientWidth - left -
|
|
616
|
+
parseFloat(goog.style.getComputedStyle(el, 'borderRightWidth'));
|
|
617
|
+
left += scrollbarWidth;
|
|
618
|
+
}
|
|
619
|
+
return new goog.math.Coordinate(left,
|
|
620
|
+
parseFloat(goog.style.getComputedStyle(el, 'borderTopWidth')));
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return new goog.math.Coordinate(el.clientLeft, el.clientTop);
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Returns a Coordinate object relative to the top-left of the HTML document.
|
|
629
|
+
* Implemented as a single function to save having to do two recursive loops in
|
|
630
|
+
* opera and safari just to get both coordinates. If you just want one value do
|
|
631
|
+
* use goog.style.getPageOffsetLeft() and goog.style.getPageOffsetTop(), but
|
|
632
|
+
* note if you call both those methods the tree will be analysed twice.
|
|
633
|
+
*
|
|
634
|
+
* @param {Element} el Element to get the page offset for.
|
|
635
|
+
* @return {!goog.math.Coordinate} The page offset.
|
|
636
|
+
*/
|
|
637
|
+
goog.style.getPageOffset = function(el) {
|
|
638
|
+
var box, doc = goog.dom.getOwnerDocument(el);
|
|
639
|
+
var positionStyle = goog.style.getStyle_(el, 'position');
|
|
640
|
+
// TODO(gboyer): Update the jsdoc in a way that doesn't break the universe.
|
|
641
|
+
goog.asserts.assertObject(el, 'Parameter is required');
|
|
642
|
+
|
|
643
|
+
// NOTE(eae): Gecko pre 1.9 normally use getBoxObjectFor to calculate the
|
|
644
|
+
// position. When invoked for an element with position absolute and a negative
|
|
645
|
+
// position though it can be off by one. Therefor the recursive implementation
|
|
646
|
+
// is used in those (relatively rare) cases.
|
|
647
|
+
var BUGGY_GECKO_BOX_OBJECT =
|
|
648
|
+
!goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS &&
|
|
649
|
+
goog.userAgent.GECKO && doc.getBoxObjectFor &&
|
|
650
|
+
!el.getBoundingClientRect && positionStyle == 'absolute' &&
|
|
651
|
+
(box = doc.getBoxObjectFor(el)) && (box.screenX < 0 || box.screenY < 0);
|
|
652
|
+
|
|
653
|
+
// NOTE(arv): If element is hidden (display none or disconnected or any the
|
|
654
|
+
// ancestors are hidden) we get (0,0) by default but we still do the
|
|
655
|
+
// accumulation of scroll position.
|
|
656
|
+
|
|
657
|
+
// TODO(arv): Should we check if the node is disconnected and in that case
|
|
658
|
+
// return (0,0)?
|
|
659
|
+
|
|
660
|
+
var pos = new goog.math.Coordinate(0, 0);
|
|
661
|
+
var viewportElement = goog.style.getClientViewportElement(doc);
|
|
662
|
+
if (el == viewportElement) {
|
|
663
|
+
// viewport is always at 0,0 as that defined the coordinate system for this
|
|
664
|
+
// function - this avoids special case checks in the code below
|
|
665
|
+
return pos;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// IE, Gecko 1.9+, and most modern WebKit.
|
|
669
|
+
if (goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS ||
|
|
670
|
+
el.getBoundingClientRect) {
|
|
671
|
+
box = goog.style.getBoundingClientRect_(el);
|
|
672
|
+
// Must add the scroll coordinates in to get the absolute page offset
|
|
673
|
+
// of element since getBoundingClientRect returns relative coordinates to
|
|
674
|
+
// the viewport.
|
|
675
|
+
var scrollCoord = goog.dom.getDomHelper(doc).getDocumentScroll();
|
|
676
|
+
pos.x = box.left + scrollCoord.x;
|
|
677
|
+
pos.y = box.top + scrollCoord.y;
|
|
678
|
+
|
|
679
|
+
// Gecko prior to 1.9.
|
|
680
|
+
} else if (doc.getBoxObjectFor && !BUGGY_GECKO_BOX_OBJECT) {
|
|
681
|
+
// Gecko ignores the scroll values for ancestors, up to 1.9. See:
|
|
682
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=328881 and
|
|
683
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=330619
|
|
684
|
+
|
|
685
|
+
box = doc.getBoxObjectFor(el);
|
|
686
|
+
// TODO(user): Fix the off-by-one error when window is scrolled down
|
|
687
|
+
// or right more than 1 pixel. The viewport offset does not move in lock
|
|
688
|
+
// step with the window scroll; it moves in increments of 2px and at
|
|
689
|
+
// somewhat random intervals.
|
|
690
|
+
var vpBox = doc.getBoxObjectFor(viewportElement);
|
|
691
|
+
pos.x = box.screenX - vpBox.screenX;
|
|
692
|
+
pos.y = box.screenY - vpBox.screenY;
|
|
693
|
+
|
|
694
|
+
// Safari, Opera and Camino up to 1.0.4.
|
|
695
|
+
} else {
|
|
696
|
+
var parent = el;
|
|
697
|
+
do {
|
|
698
|
+
pos.x += parent.offsetLeft;
|
|
699
|
+
pos.y += parent.offsetTop;
|
|
700
|
+
// For safari/chrome, we need to add parent's clientLeft/Top as well.
|
|
701
|
+
if (parent != el) {
|
|
702
|
+
pos.x += parent.clientLeft || 0;
|
|
703
|
+
pos.y += parent.clientTop || 0;
|
|
704
|
+
}
|
|
705
|
+
// In Safari when hit a position fixed element the rest of the offsets
|
|
706
|
+
// are not correct.
|
|
707
|
+
if (goog.userAgent.WEBKIT &&
|
|
708
|
+
goog.style.getComputedPosition(parent) == 'fixed') {
|
|
709
|
+
pos.x += doc.body.scrollLeft;
|
|
710
|
+
pos.y += doc.body.scrollTop;
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
parent = parent.offsetParent;
|
|
714
|
+
} while (parent && parent != el);
|
|
715
|
+
|
|
716
|
+
// Opera & (safari absolute) incorrectly account for body offsetTop.
|
|
717
|
+
if (goog.userAgent.OPERA || (goog.userAgent.WEBKIT &&
|
|
718
|
+
positionStyle == 'absolute')) {
|
|
719
|
+
pos.y -= doc.body.offsetTop;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
for (parent = el; (parent = goog.style.getOffsetParent(parent)) &&
|
|
723
|
+
parent != doc.body && parent != viewportElement; ) {
|
|
724
|
+
pos.x -= parent.scrollLeft;
|
|
725
|
+
// Workaround for a bug in Opera 9.2 (and earlier) where table rows may
|
|
726
|
+
// report an invalid scroll top value. The bug was fixed in Opera 9.5
|
|
727
|
+
// however as that version supports getBoundingClientRect it won't
|
|
728
|
+
// trigger this code path. https://bugs.opera.com/show_bug.cgi?id=249965
|
|
729
|
+
if (!goog.userAgent.OPERA || parent.tagName != 'TR') {
|
|
730
|
+
pos.y -= parent.scrollTop;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
return pos;
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Returns the left coordinate of an element relative to the HTML document
|
|
741
|
+
* @param {Element} el Elements.
|
|
742
|
+
* @return {number} The left coordinate.
|
|
743
|
+
*/
|
|
744
|
+
goog.style.getPageOffsetLeft = function(el) {
|
|
745
|
+
return goog.style.getPageOffset(el).x;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Returns the top coordinate of an element relative to the HTML document
|
|
751
|
+
* @param {Element} el Elements.
|
|
752
|
+
* @return {number} The top coordinate.
|
|
753
|
+
*/
|
|
754
|
+
goog.style.getPageOffsetTop = function(el) {
|
|
755
|
+
return goog.style.getPageOffset(el).y;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Returns a Coordinate object relative to the top-left of an HTML document
|
|
761
|
+
* in an ancestor frame of this element. Used for measuring the position of
|
|
762
|
+
* an element inside a frame relative to a containing frame.
|
|
763
|
+
*
|
|
764
|
+
* @param {Element} el Element to get the page offset for.
|
|
765
|
+
* @param {Window} relativeWin The window to measure relative to. If relativeWin
|
|
766
|
+
* is not in the ancestor frame chain of the element, we measure relative to
|
|
767
|
+
* the top-most window.
|
|
768
|
+
* @return {!goog.math.Coordinate} The page offset.
|
|
769
|
+
*/
|
|
770
|
+
goog.style.getFramedPageOffset = function(el, relativeWin) {
|
|
771
|
+
var position = new goog.math.Coordinate(0, 0);
|
|
772
|
+
|
|
773
|
+
// Iterate up the ancestor frame chain, keeping track of the current window
|
|
774
|
+
// and the current element in that window.
|
|
775
|
+
var currentWin = goog.dom.getWindow(goog.dom.getOwnerDocument(el));
|
|
776
|
+
var currentEl = el;
|
|
777
|
+
do {
|
|
778
|
+
// if we're at the top window, we want to get the page offset.
|
|
779
|
+
// if we're at an inner frame, we only want to get the window position
|
|
780
|
+
// so that we can determine the actual page offset in the context of
|
|
781
|
+
// the outer window.
|
|
782
|
+
var offset = currentWin == relativeWin ?
|
|
783
|
+
goog.style.getPageOffset(currentEl) :
|
|
784
|
+
goog.style.getClientPositionForElement_(
|
|
785
|
+
goog.asserts.assert(currentEl));
|
|
786
|
+
|
|
787
|
+
position.x += offset.x;
|
|
788
|
+
position.y += offset.y;
|
|
789
|
+
} while (currentWin && currentWin != relativeWin &&
|
|
790
|
+
(currentEl = currentWin.frameElement) &&
|
|
791
|
+
(currentWin = currentWin.parent));
|
|
792
|
+
|
|
793
|
+
return position;
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Translates the specified rect relative to origBase page, for newBase page.
|
|
799
|
+
* If origBase and newBase are the same, this function does nothing.
|
|
800
|
+
*
|
|
801
|
+
* @param {goog.math.Rect} rect The source rectangle relative to origBase page,
|
|
802
|
+
* and it will have the translated result.
|
|
803
|
+
* @param {goog.dom.DomHelper} origBase The DomHelper for the input rectangle.
|
|
804
|
+
* @param {goog.dom.DomHelper} newBase The DomHelper for the resultant
|
|
805
|
+
* coordinate. This must be a DOM for an ancestor frame of origBase
|
|
806
|
+
* or the same as origBase.
|
|
807
|
+
*/
|
|
808
|
+
goog.style.translateRectForAnotherFrame = function(rect, origBase, newBase) {
|
|
809
|
+
if (origBase.getDocument() != newBase.getDocument()) {
|
|
810
|
+
var body = origBase.getDocument().body;
|
|
811
|
+
var pos = goog.style.getFramedPageOffset(body, newBase.getWindow());
|
|
812
|
+
|
|
813
|
+
// Adjust Body's margin.
|
|
814
|
+
pos = goog.math.Coordinate.difference(pos, goog.style.getPageOffset(body));
|
|
815
|
+
|
|
816
|
+
if (goog.userAgent.IE && !origBase.isCss1CompatMode()) {
|
|
817
|
+
pos = goog.math.Coordinate.difference(pos, origBase.getDocumentScroll());
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
rect.left += pos.x;
|
|
821
|
+
rect.top += pos.y;
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Returns the position of an element relative to another element in the
|
|
828
|
+
* document. A relative to B
|
|
829
|
+
* @param {Element|Event|goog.events.Event} a Element or mouse event whose
|
|
830
|
+
* position we're calculating.
|
|
831
|
+
* @param {Element|Event|goog.events.Event} b Element or mouse event position
|
|
832
|
+
* is relative to.
|
|
833
|
+
* @return {!goog.math.Coordinate} The relative position.
|
|
834
|
+
*/
|
|
835
|
+
goog.style.getRelativePosition = function(a, b) {
|
|
836
|
+
var ap = goog.style.getClientPosition(a);
|
|
837
|
+
var bp = goog.style.getClientPosition(b);
|
|
838
|
+
return new goog.math.Coordinate(ap.x - bp.x, ap.y - bp.y);
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Returns the position of the event or the element's border box relative to
|
|
844
|
+
* the client viewport.
|
|
845
|
+
* @param {!Element} el Element whose position to get.
|
|
846
|
+
* @return {!goog.math.Coordinate} The position.
|
|
847
|
+
* @private
|
|
848
|
+
*/
|
|
849
|
+
goog.style.getClientPositionForElement_ = function(el) {
|
|
850
|
+
var pos;
|
|
851
|
+
if (goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS ||
|
|
852
|
+
el.getBoundingClientRect) {
|
|
853
|
+
// IE, Gecko 1.9+, and most modern WebKit
|
|
854
|
+
var box = goog.style.getBoundingClientRect_(el);
|
|
855
|
+
pos = new goog.math.Coordinate(box.left, box.top);
|
|
856
|
+
} else {
|
|
857
|
+
var scrollCoord = goog.dom.getDomHelper(el).getDocumentScroll();
|
|
858
|
+
var pageCoord = goog.style.getPageOffset(el);
|
|
859
|
+
pos = new goog.math.Coordinate(
|
|
860
|
+
pageCoord.x - scrollCoord.x,
|
|
861
|
+
pageCoord.y - scrollCoord.y);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
// Gecko below version 12 doesn't add CSS translation to the client position
|
|
865
|
+
// (using either getBoundingClientRect or getBoxOffsetFor) so we need to do
|
|
866
|
+
// so manually.
|
|
867
|
+
if (goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher(12)) {
|
|
868
|
+
return goog.math.Coordinate.sum(pos, goog.style.getCssTranslation(el));
|
|
869
|
+
} else {
|
|
870
|
+
return pos;
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Returns the position of the event or the element's border box relative to
|
|
877
|
+
* the client viewport.
|
|
878
|
+
* @param {Element|Event|goog.events.Event} el Element or a mouse / touch event.
|
|
879
|
+
* @return {!goog.math.Coordinate} The position.
|
|
880
|
+
*/
|
|
881
|
+
goog.style.getClientPosition = function(el) {
|
|
882
|
+
goog.asserts.assert(el);
|
|
883
|
+
if (el.nodeType == goog.dom.NodeType.ELEMENT) {
|
|
884
|
+
return goog.style.getClientPositionForElement_(
|
|
885
|
+
/** @type {!Element} */ (el));
|
|
886
|
+
} else {
|
|
887
|
+
var isAbstractedEvent = goog.isFunction(el.getBrowserEvent);
|
|
888
|
+
var targetEvent = el;
|
|
889
|
+
|
|
890
|
+
if (el.targetTouches) {
|
|
891
|
+
targetEvent = el.targetTouches[0];
|
|
892
|
+
} else if (isAbstractedEvent && el.getBrowserEvent().targetTouches) {
|
|
893
|
+
targetEvent = el.getBrowserEvent().targetTouches[0];
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
return new goog.math.Coordinate(
|
|
897
|
+
targetEvent.clientX,
|
|
898
|
+
targetEvent.clientY);
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Moves an element to the given coordinates relative to the client viewport.
|
|
905
|
+
* @param {Element} el Absolutely positioned element to set page offset for.
|
|
906
|
+
* It must be in the document.
|
|
907
|
+
* @param {number|goog.math.Coordinate} x Left position of the element's margin
|
|
908
|
+
* box or a coordinate object.
|
|
909
|
+
* @param {number=} opt_y Top position of the element's margin box.
|
|
910
|
+
*/
|
|
911
|
+
goog.style.setPageOffset = function(el, x, opt_y) {
|
|
912
|
+
// Get current pageoffset
|
|
913
|
+
var cur = goog.style.getPageOffset(el);
|
|
914
|
+
|
|
915
|
+
if (x instanceof goog.math.Coordinate) {
|
|
916
|
+
opt_y = x.y;
|
|
917
|
+
x = x.x;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
// NOTE(arv): We cannot allow strings for x and y. We could but that would
|
|
921
|
+
// require us to manually transform between different units
|
|
922
|
+
|
|
923
|
+
// Work out deltas
|
|
924
|
+
var dx = x - cur.x;
|
|
925
|
+
var dy = opt_y - cur.y;
|
|
926
|
+
|
|
927
|
+
// Set position to current left/top + delta
|
|
928
|
+
goog.style.setPosition(el, el.offsetLeft + dx, el.offsetTop + dy);
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Sets the width/height values of an element. If an argument is numeric,
|
|
934
|
+
* or a goog.math.Size is passed, it is assumed to be pixels and will add
|
|
935
|
+
* 'px' after converting it to an integer in string form. (This just sets the
|
|
936
|
+
* CSS width and height properties so it might set content-box or border-box
|
|
937
|
+
* size depending on the box model the browser is using.)
|
|
938
|
+
*
|
|
939
|
+
* @param {Element} element Element to set the size of.
|
|
940
|
+
* @param {string|number|goog.math.Size} w Width of the element, or a
|
|
941
|
+
* size object.
|
|
942
|
+
* @param {string|number=} opt_h Height of the element. Required if w is not a
|
|
943
|
+
* size object.
|
|
944
|
+
*/
|
|
945
|
+
goog.style.setSize = function(element, w, opt_h) {
|
|
946
|
+
var h;
|
|
947
|
+
if (w instanceof goog.math.Size) {
|
|
948
|
+
h = w.height;
|
|
949
|
+
w = w.width;
|
|
950
|
+
} else {
|
|
951
|
+
if (opt_h == undefined) {
|
|
952
|
+
throw Error('missing height argument');
|
|
953
|
+
}
|
|
954
|
+
h = opt_h;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
goog.style.setWidth(element, /** @type {string|number} */ (w));
|
|
958
|
+
goog.style.setHeight(element, /** @type {string|number} */ (h));
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Helper function to create a string to be set into a pixel-value style
|
|
964
|
+
* property of an element. Can round to the nearest integer value.
|
|
965
|
+
*
|
|
966
|
+
* @param {string|number} value The style value to be used. If a number,
|
|
967
|
+
* 'px' will be appended, otherwise the value will be applied directly.
|
|
968
|
+
* @param {boolean} round Whether to round the nearest integer (if property
|
|
969
|
+
* is a number).
|
|
970
|
+
* @return {string} The string value for the property.
|
|
971
|
+
* @private
|
|
972
|
+
*/
|
|
973
|
+
goog.style.getPixelStyleValue_ = function(value, round) {
|
|
974
|
+
if (typeof value == 'number') {
|
|
975
|
+
value = (round ? Math.round(value) : value) + 'px';
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
return value;
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Set the height of an element. Sets the element's style property.
|
|
984
|
+
* @param {Element} element Element to set the height of.
|
|
985
|
+
* @param {string|number} height The height value to set. If a number, 'px'
|
|
986
|
+
* will be appended, otherwise the value will be applied directly.
|
|
987
|
+
*/
|
|
988
|
+
goog.style.setHeight = function(element, height) {
|
|
989
|
+
element.style.height = goog.style.getPixelStyleValue_(height, true);
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Set the width of an element. Sets the element's style property.
|
|
995
|
+
* @param {Element} element Element to set the width of.
|
|
996
|
+
* @param {string|number} width The width value to set. If a number, 'px'
|
|
997
|
+
* will be appended, otherwise the value will be applied directly.
|
|
998
|
+
*/
|
|
999
|
+
goog.style.setWidth = function(element, width) {
|
|
1000
|
+
element.style.width = goog.style.getPixelStyleValue_(width, true);
|
|
1001
|
+
};
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Gets the height and width of an element, even if its display is none.
|
|
1006
|
+
*
|
|
1007
|
+
* Specifically, this returns the height and width of the border box,
|
|
1008
|
+
* irrespective of the box model in effect.
|
|
1009
|
+
*
|
|
1010
|
+
* Note that this function does not take CSS transforms into account. Please see
|
|
1011
|
+
* {@code goog.style.getTransformedSize}.
|
|
1012
|
+
* @param {Element} element Element to get size of.
|
|
1013
|
+
* @return {!goog.math.Size} Object with width/height properties.
|
|
1014
|
+
*/
|
|
1015
|
+
goog.style.getSize = function(element) {
|
|
1016
|
+
return goog.style.evaluateWithTemporaryDisplay_(
|
|
1017
|
+
goog.style.getSizeWithDisplay_, /** @type {!Element} */ (element));
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Call {@code fn} on {@code element} such that {@code element}'s dimensions are
|
|
1023
|
+
* accurate when it's passed to {@code fn}.
|
|
1024
|
+
* @param {function(!Element): T} fn Function to call with {@code element} as
|
|
1025
|
+
* an argument after temporarily changing {@code element}'s display such
|
|
1026
|
+
* that its dimensions are accurate.
|
|
1027
|
+
* @param {!Element} element Element (which may have display none) to use as
|
|
1028
|
+
* argument to {@code fn}.
|
|
1029
|
+
* @return {T} Value returned by calling {@code fn} with {@code element}.
|
|
1030
|
+
* @template T
|
|
1031
|
+
* @private
|
|
1032
|
+
*/
|
|
1033
|
+
goog.style.evaluateWithTemporaryDisplay_ = function(fn, element) {
|
|
1034
|
+
if (goog.style.getStyle_(element, 'display') != 'none') {
|
|
1035
|
+
return fn(element);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
var style = element.style;
|
|
1039
|
+
var originalDisplay = style.display;
|
|
1040
|
+
var originalVisibility = style.visibility;
|
|
1041
|
+
var originalPosition = style.position;
|
|
1042
|
+
|
|
1043
|
+
style.visibility = 'hidden';
|
|
1044
|
+
style.position = 'absolute';
|
|
1045
|
+
style.display = 'inline';
|
|
1046
|
+
|
|
1047
|
+
var retVal = fn(element);
|
|
1048
|
+
|
|
1049
|
+
style.display = originalDisplay;
|
|
1050
|
+
style.position = originalPosition;
|
|
1051
|
+
style.visibility = originalVisibility;
|
|
1052
|
+
|
|
1053
|
+
return retVal;
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Gets the height and width of an element when the display is not none.
|
|
1059
|
+
* @param {Element} element Element to get size of.
|
|
1060
|
+
* @return {!goog.math.Size} Object with width/height properties.
|
|
1061
|
+
* @private
|
|
1062
|
+
*/
|
|
1063
|
+
goog.style.getSizeWithDisplay_ = function(element) {
|
|
1064
|
+
var offsetWidth = element.offsetWidth;
|
|
1065
|
+
var offsetHeight = element.offsetHeight;
|
|
1066
|
+
var webkitOffsetsZero =
|
|
1067
|
+
goog.userAgent.WEBKIT && !offsetWidth && !offsetHeight;
|
|
1068
|
+
if ((!goog.isDef(offsetWidth) || webkitOffsetsZero) &&
|
|
1069
|
+
element.getBoundingClientRect) {
|
|
1070
|
+
// Fall back to calling getBoundingClientRect when offsetWidth or
|
|
1071
|
+
// offsetHeight are not defined, or when they are zero in WebKit browsers.
|
|
1072
|
+
// This makes sure that we return for the correct size for SVG elements, but
|
|
1073
|
+
// will still return 0 on Webkit prior to 534.8, see
|
|
1074
|
+
// http://trac.webkit.org/changeset/67252.
|
|
1075
|
+
var clientRect = goog.style.getBoundingClientRect_(element);
|
|
1076
|
+
return new goog.math.Size(clientRect.right - clientRect.left,
|
|
1077
|
+
clientRect.bottom - clientRect.top);
|
|
1078
|
+
}
|
|
1079
|
+
return new goog.math.Size(offsetWidth, offsetHeight);
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Gets the height and width of an element, post transform, even if its display
|
|
1085
|
+
* is none.
|
|
1086
|
+
*
|
|
1087
|
+
* This is like {@code goog.style.getSize}, except:
|
|
1088
|
+
* <ol>
|
|
1089
|
+
* <li>Takes webkitTransforms such as rotate and scale into account.
|
|
1090
|
+
* <li>Will return null if {@code element} doesn't respond to
|
|
1091
|
+
* {@code getBoundingClientRect}.
|
|
1092
|
+
* <li>Currently doesn't make sense on non-WebKit browsers which don't support
|
|
1093
|
+
* webkitTransforms.
|
|
1094
|
+
* </ol>
|
|
1095
|
+
* @param {!Element} element Element to get size of.
|
|
1096
|
+
* @return {goog.math.Size} Object with width/height properties.
|
|
1097
|
+
*/
|
|
1098
|
+
goog.style.getTransformedSize = function(element) {
|
|
1099
|
+
if (!element.getBoundingClientRect) {
|
|
1100
|
+
return null;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
var clientRect = goog.style.evaluateWithTemporaryDisplay_(
|
|
1104
|
+
goog.style.getBoundingClientRect_, element);
|
|
1105
|
+
return new goog.math.Size(clientRect.right - clientRect.left,
|
|
1106
|
+
clientRect.bottom - clientRect.top);
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Returns a bounding rectangle for a given element in page space.
|
|
1112
|
+
* @param {Element} element Element to get bounds of. Must not be display none.
|
|
1113
|
+
* @return {!goog.math.Rect} Bounding rectangle for the element.
|
|
1114
|
+
*/
|
|
1115
|
+
goog.style.getBounds = function(element) {
|
|
1116
|
+
var o = goog.style.getPageOffset(element);
|
|
1117
|
+
var s = goog.style.getSize(element);
|
|
1118
|
+
return new goog.math.Rect(o.x, o.y, s.width, s.height);
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Converts a CSS selector in the form style-property to styleProperty.
|
|
1124
|
+
* @param {*} selector CSS Selector.
|
|
1125
|
+
* @return {string} Camel case selector.
|
|
1126
|
+
* @deprecated Use goog.string.toCamelCase instead.
|
|
1127
|
+
*/
|
|
1128
|
+
goog.style.toCamelCase = function(selector) {
|
|
1129
|
+
return goog.string.toCamelCase(String(selector));
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Converts a CSS selector in the form styleProperty to style-property.
|
|
1135
|
+
* @param {string} selector Camel case selector.
|
|
1136
|
+
* @return {string} Selector cased.
|
|
1137
|
+
* @deprecated Use goog.string.toSelectorCase instead.
|
|
1138
|
+
*/
|
|
1139
|
+
goog.style.toSelectorCase = function(selector) {
|
|
1140
|
+
return goog.string.toSelectorCase(selector);
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Gets the opacity of a node (x-browser). This gets the inline style opacity
|
|
1146
|
+
* of the node, and does not take into account the cascaded or the computed
|
|
1147
|
+
* style for this node.
|
|
1148
|
+
* @param {Element} el Element whose opacity has to be found.
|
|
1149
|
+
* @return {number|string} Opacity between 0 and 1 or an empty string {@code ''}
|
|
1150
|
+
* if the opacity is not set.
|
|
1151
|
+
*/
|
|
1152
|
+
goog.style.getOpacity = function(el) {
|
|
1153
|
+
var style = el.style;
|
|
1154
|
+
var result = '';
|
|
1155
|
+
if ('opacity' in style) {
|
|
1156
|
+
result = style.opacity;
|
|
1157
|
+
} else if ('MozOpacity' in style) {
|
|
1158
|
+
result = style.MozOpacity;
|
|
1159
|
+
} else if ('filter' in style) {
|
|
1160
|
+
var match = style.filter.match(/alpha\(opacity=([\d.]+)\)/);
|
|
1161
|
+
if (match) {
|
|
1162
|
+
result = String(match[1] / 100);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
return result == '' ? result : Number(result);
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Sets the opacity of a node (x-browser).
|
|
1171
|
+
* @param {Element} el Elements whose opacity has to be set.
|
|
1172
|
+
* @param {number|string} alpha Opacity between 0 and 1 or an empty string
|
|
1173
|
+
* {@code ''} to clear the opacity.
|
|
1174
|
+
*/
|
|
1175
|
+
goog.style.setOpacity = function(el, alpha) {
|
|
1176
|
+
var style = el.style;
|
|
1177
|
+
if ('opacity' in style) {
|
|
1178
|
+
style.opacity = alpha;
|
|
1179
|
+
} else if ('MozOpacity' in style) {
|
|
1180
|
+
style.MozOpacity = alpha;
|
|
1181
|
+
} else if ('filter' in style) {
|
|
1182
|
+
// TODO(arv): Overwriting the filter might have undesired side effects.
|
|
1183
|
+
if (alpha === '') {
|
|
1184
|
+
style.filter = '';
|
|
1185
|
+
} else {
|
|
1186
|
+
style.filter = 'alpha(opacity=' + alpha * 100 + ')';
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* Sets the background of an element to a transparent image in a browser-
|
|
1194
|
+
* independent manner.
|
|
1195
|
+
*
|
|
1196
|
+
* This function does not support repeating backgrounds or alternate background
|
|
1197
|
+
* positions to match the behavior of Internet Explorer. It also does not
|
|
1198
|
+
* support sizingMethods other than crop since they cannot be replicated in
|
|
1199
|
+
* browsers other than Internet Explorer.
|
|
1200
|
+
*
|
|
1201
|
+
* @param {Element} el The element to set background on.
|
|
1202
|
+
* @param {string} src The image source URL.
|
|
1203
|
+
*/
|
|
1204
|
+
goog.style.setTransparentBackgroundImage = function(el, src) {
|
|
1205
|
+
var style = el.style;
|
|
1206
|
+
// It is safe to use the style.filter in IE only. In Safari 'filter' is in
|
|
1207
|
+
// style object but access to style.filter causes it to throw an exception.
|
|
1208
|
+
// Note: IE8 supports images with an alpha channel.
|
|
1209
|
+
if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('8')) {
|
|
1210
|
+
// See TODO in setOpacity.
|
|
1211
|
+
style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(' +
|
|
1212
|
+
'src="' + src + '", sizingMethod="crop")';
|
|
1213
|
+
} else {
|
|
1214
|
+
// Set style properties individually instead of using background shorthand
|
|
1215
|
+
// to prevent overwriting a pre-existing background color.
|
|
1216
|
+
style.backgroundImage = 'url(' + src + ')';
|
|
1217
|
+
style.backgroundPosition = 'top left';
|
|
1218
|
+
style.backgroundRepeat = 'no-repeat';
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Clears the background image of an element in a browser independent manner.
|
|
1225
|
+
* @param {Element} el The element to clear background image for.
|
|
1226
|
+
*/
|
|
1227
|
+
goog.style.clearTransparentBackgroundImage = function(el) {
|
|
1228
|
+
var style = el.style;
|
|
1229
|
+
if ('filter' in style) {
|
|
1230
|
+
// See TODO in setOpacity.
|
|
1231
|
+
style.filter = '';
|
|
1232
|
+
} else {
|
|
1233
|
+
// Set style properties individually instead of using background shorthand
|
|
1234
|
+
// to prevent overwriting a pre-existing background color.
|
|
1235
|
+
style.backgroundImage = 'none';
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Shows or hides an element from the page. Hiding the element is done by
|
|
1242
|
+
* setting the display property to "none", removing the element from the
|
|
1243
|
+
* rendering hierarchy so it takes up no space. To show the element, the default
|
|
1244
|
+
* inherited display property is restored (defined either in stylesheets or by
|
|
1245
|
+
* the browser's default style rules.)
|
|
1246
|
+
*
|
|
1247
|
+
* Caveat 1: if the inherited display property for the element is set to "none"
|
|
1248
|
+
* by the stylesheets, that is the property that will be restored by a call to
|
|
1249
|
+
* showElement(), effectively toggling the display between "none" and "none".
|
|
1250
|
+
*
|
|
1251
|
+
* Caveat 2: if the element display style is set inline (by setting either
|
|
1252
|
+
* element.style.display or a style attribute in the HTML), a call to
|
|
1253
|
+
* showElement will clear that setting and defer to the inherited style in the
|
|
1254
|
+
* stylesheet.
|
|
1255
|
+
* @param {Element} el Element to show or hide.
|
|
1256
|
+
* @param {*} display True to render the element in its default style,
|
|
1257
|
+
* false to disable rendering the element.
|
|
1258
|
+
* @deprecated Use goog.style.setElementShown instead.
|
|
1259
|
+
*/
|
|
1260
|
+
goog.style.showElement = function(el, display) {
|
|
1261
|
+
goog.style.setElementShown(el, display);
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Shows or hides an element from the page. Hiding the element is done by
|
|
1267
|
+
* setting the display property to "none", removing the element from the
|
|
1268
|
+
* rendering hierarchy so it takes up no space. To show the element, the default
|
|
1269
|
+
* inherited display property is restored (defined either in stylesheets or by
|
|
1270
|
+
* the browser's default style rules).
|
|
1271
|
+
*
|
|
1272
|
+
* Caveat 1: if the inherited display property for the element is set to "none"
|
|
1273
|
+
* by the stylesheets, that is the property that will be restored by a call to
|
|
1274
|
+
* setElementShown(), effectively toggling the display between "none" and
|
|
1275
|
+
* "none".
|
|
1276
|
+
*
|
|
1277
|
+
* Caveat 2: if the element display style is set inline (by setting either
|
|
1278
|
+
* element.style.display or a style attribute in the HTML), a call to
|
|
1279
|
+
* setElementShown will clear that setting and defer to the inherited style in
|
|
1280
|
+
* the stylesheet.
|
|
1281
|
+
* @param {Element} el Element to show or hide.
|
|
1282
|
+
* @param {*} isShown True to render the element in its default style,
|
|
1283
|
+
* false to disable rendering the element.
|
|
1284
|
+
*/
|
|
1285
|
+
goog.style.setElementShown = function(el, isShown) {
|
|
1286
|
+
el.style.display = isShown ? '' : 'none';
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Test whether the given element has been shown or hidden via a call to
|
|
1292
|
+
* {@link #setElementShown}.
|
|
1293
|
+
*
|
|
1294
|
+
* Note this is strictly a companion method for a call
|
|
1295
|
+
* to {@link #setElementShown} and the same caveats apply; in particular, this
|
|
1296
|
+
* method does not guarantee that the return value will be consistent with
|
|
1297
|
+
* whether or not the element is actually visible.
|
|
1298
|
+
*
|
|
1299
|
+
* @param {Element} el The element to test.
|
|
1300
|
+
* @return {boolean} Whether the element has been shown.
|
|
1301
|
+
* @see #setElementShown
|
|
1302
|
+
*/
|
|
1303
|
+
goog.style.isElementShown = function(el) {
|
|
1304
|
+
return el.style.display != 'none';
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Installs the styles string into the window that contains opt_element. If
|
|
1310
|
+
* opt_element is null, the main window is used.
|
|
1311
|
+
* @param {string} stylesString The style string to install.
|
|
1312
|
+
* @param {Node=} opt_node Node whose parent document should have the
|
|
1313
|
+
* styles installed.
|
|
1314
|
+
* @return {Element|StyleSheet} The style element created.
|
|
1315
|
+
*/
|
|
1316
|
+
goog.style.installStyles = function(stylesString, opt_node) {
|
|
1317
|
+
var dh = goog.dom.getDomHelper(opt_node);
|
|
1318
|
+
var styleSheet = null;
|
|
1319
|
+
|
|
1320
|
+
if (goog.userAgent.IE) {
|
|
1321
|
+
styleSheet = dh.getDocument().createStyleSheet();
|
|
1322
|
+
goog.style.setStyles(styleSheet, stylesString);
|
|
1323
|
+
} else {
|
|
1324
|
+
var head = dh.getElementsByTagNameAndClass('head')[0];
|
|
1325
|
+
|
|
1326
|
+
// In opera documents are not guaranteed to have a head element, thus we
|
|
1327
|
+
// have to make sure one exists before using it.
|
|
1328
|
+
if (!head) {
|
|
1329
|
+
var body = dh.getElementsByTagNameAndClass('body')[0];
|
|
1330
|
+
head = dh.createDom('head');
|
|
1331
|
+
body.parentNode.insertBefore(head, body);
|
|
1332
|
+
}
|
|
1333
|
+
styleSheet = dh.createDom('style');
|
|
1334
|
+
// NOTE(user): Setting styles after the style element has been appended
|
|
1335
|
+
// to the head results in a nasty Webkit bug in certain scenarios. Please
|
|
1336
|
+
// refer to https://bugs.webkit.org/show_bug.cgi?id=26307 for additional
|
|
1337
|
+
// details.
|
|
1338
|
+
goog.style.setStyles(styleSheet, stylesString);
|
|
1339
|
+
dh.appendChild(head, styleSheet);
|
|
1340
|
+
}
|
|
1341
|
+
return styleSheet;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Removes the styles added by {@link #installStyles}.
|
|
1347
|
+
* @param {Element|StyleSheet} styleSheet The value returned by
|
|
1348
|
+
* {@link #installStyles}.
|
|
1349
|
+
*/
|
|
1350
|
+
goog.style.uninstallStyles = function(styleSheet) {
|
|
1351
|
+
var node = styleSheet.ownerNode || styleSheet.owningElement ||
|
|
1352
|
+
/** @type {Element} */ (styleSheet);
|
|
1353
|
+
goog.dom.removeNode(node);
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Sets the content of a style element. The style element can be any valid
|
|
1359
|
+
* style element. This element will have its content completely replaced by
|
|
1360
|
+
* the new stylesString.
|
|
1361
|
+
* @param {Element|StyleSheet} element A stylesheet element as returned by
|
|
1362
|
+
* installStyles.
|
|
1363
|
+
* @param {string} stylesString The new content of the stylesheet.
|
|
1364
|
+
*/
|
|
1365
|
+
goog.style.setStyles = function(element, stylesString) {
|
|
1366
|
+
if (goog.userAgent.IE) {
|
|
1367
|
+
// Adding the selectors individually caused the browser to hang if the
|
|
1368
|
+
// selector was invalid or there were CSS comments. Setting the cssText of
|
|
1369
|
+
// the style node works fine and ignores CSS that IE doesn't understand
|
|
1370
|
+
element.cssText = stylesString;
|
|
1371
|
+
} else {
|
|
1372
|
+
element.innerHTML = stylesString;
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Sets 'white-space: pre-wrap' for a node (x-browser).
|
|
1379
|
+
*
|
|
1380
|
+
* There are as many ways of specifying pre-wrap as there are browsers.
|
|
1381
|
+
*
|
|
1382
|
+
* CSS3/IE8: white-space: pre-wrap;
|
|
1383
|
+
* Mozilla: white-space: -moz-pre-wrap;
|
|
1384
|
+
* Opera: white-space: -o-pre-wrap;
|
|
1385
|
+
* IE6/7: white-space: pre; word-wrap: break-word;
|
|
1386
|
+
*
|
|
1387
|
+
* @param {Element} el Element to enable pre-wrap for.
|
|
1388
|
+
*/
|
|
1389
|
+
goog.style.setPreWrap = function(el) {
|
|
1390
|
+
var style = el.style;
|
|
1391
|
+
if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('8')) {
|
|
1392
|
+
style.whiteSpace = 'pre';
|
|
1393
|
+
style.wordWrap = 'break-word';
|
|
1394
|
+
} else if (goog.userAgent.GECKO) {
|
|
1395
|
+
style.whiteSpace = '-moz-pre-wrap';
|
|
1396
|
+
} else {
|
|
1397
|
+
style.whiteSpace = 'pre-wrap';
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* Sets 'display: inline-block' for an element (cross-browser).
|
|
1404
|
+
* @param {Element} el Element to which the inline-block display style is to be
|
|
1405
|
+
* applied.
|
|
1406
|
+
* @see ../demos/inline_block_quirks.html
|
|
1407
|
+
* @see ../demos/inline_block_standards.html
|
|
1408
|
+
*/
|
|
1409
|
+
goog.style.setInlineBlock = function(el) {
|
|
1410
|
+
var style = el.style;
|
|
1411
|
+
// Without position:relative, weirdness ensues. Just accept it and move on.
|
|
1412
|
+
style.position = 'relative';
|
|
1413
|
+
|
|
1414
|
+
if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('8')) {
|
|
1415
|
+
// IE8 supports inline-block so fall through to the else
|
|
1416
|
+
// Zoom:1 forces hasLayout, display:inline gives inline behavior.
|
|
1417
|
+
style.zoom = '1';
|
|
1418
|
+
style.display = 'inline';
|
|
1419
|
+
} else if (goog.userAgent.GECKO) {
|
|
1420
|
+
// Pre-Firefox 3, Gecko doesn't support inline-block, but -moz-inline-box
|
|
1421
|
+
// is close enough.
|
|
1422
|
+
style.display = goog.userAgent.isVersionOrHigher('1.9a') ? 'inline-block' :
|
|
1423
|
+
'-moz-inline-box';
|
|
1424
|
+
} else {
|
|
1425
|
+
// Opera, Webkit, and Safari seem to do OK with the standard inline-block
|
|
1426
|
+
// style.
|
|
1427
|
+
style.display = 'inline-block';
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* Returns true if the element is using right to left (rtl) direction.
|
|
1434
|
+
* @param {Element} el The element to test.
|
|
1435
|
+
* @return {boolean} True for right to left, false for left to right.
|
|
1436
|
+
*/
|
|
1437
|
+
goog.style.isRightToLeft = function(el) {
|
|
1438
|
+
return 'rtl' == goog.style.getStyle_(el, 'direction');
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* The CSS style property corresponding to an element being
|
|
1444
|
+
* unselectable on the current browser platform (null if none).
|
|
1445
|
+
* Opera and IE instead use a DOM attribute 'unselectable'.
|
|
1446
|
+
* @type {?string}
|
|
1447
|
+
* @private
|
|
1448
|
+
*/
|
|
1449
|
+
goog.style.unselectableStyle_ =
|
|
1450
|
+
goog.userAgent.GECKO ? 'MozUserSelect' :
|
|
1451
|
+
goog.userAgent.WEBKIT ? 'WebkitUserSelect' :
|
|
1452
|
+
null;
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns true if the element is set to be unselectable, false otherwise.
|
|
1457
|
+
* Note that on some platforms (e.g. Mozilla), even if an element isn't set
|
|
1458
|
+
* to be unselectable, it will behave as such if any of its ancestors is
|
|
1459
|
+
* unselectable.
|
|
1460
|
+
* @param {Element} el Element to check.
|
|
1461
|
+
* @return {boolean} Whether the element is set to be unselectable.
|
|
1462
|
+
*/
|
|
1463
|
+
goog.style.isUnselectable = function(el) {
|
|
1464
|
+
if (goog.style.unselectableStyle_) {
|
|
1465
|
+
return el.style[goog.style.unselectableStyle_].toLowerCase() == 'none';
|
|
1466
|
+
} else if (goog.userAgent.IE || goog.userAgent.OPERA) {
|
|
1467
|
+
return el.getAttribute('unselectable') == 'on';
|
|
1468
|
+
}
|
|
1469
|
+
return false;
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Makes the element and its descendants selectable or unselectable. Note
|
|
1475
|
+
* that on some platforms (e.g. Mozilla), even if an element isn't set to
|
|
1476
|
+
* be unselectable, it will behave as such if any of its ancestors is
|
|
1477
|
+
* unselectable.
|
|
1478
|
+
* @param {Element} el The element to alter.
|
|
1479
|
+
* @param {boolean} unselectable Whether the element and its descendants
|
|
1480
|
+
* should be made unselectable.
|
|
1481
|
+
* @param {boolean=} opt_noRecurse Whether to only alter the element's own
|
|
1482
|
+
* selectable state, and leave its descendants alone; defaults to false.
|
|
1483
|
+
*/
|
|
1484
|
+
goog.style.setUnselectable = function(el, unselectable, opt_noRecurse) {
|
|
1485
|
+
// TODO(attila): Do we need all of TR_DomUtil.makeUnselectable() in Closure?
|
|
1486
|
+
var descendants = !opt_noRecurse ? el.getElementsByTagName('*') : null;
|
|
1487
|
+
var name = goog.style.unselectableStyle_;
|
|
1488
|
+
if (name) {
|
|
1489
|
+
// Add/remove the appropriate CSS style to/from the element and its
|
|
1490
|
+
// descendants.
|
|
1491
|
+
var value = unselectable ? 'none' : '';
|
|
1492
|
+
el.style[name] = value;
|
|
1493
|
+
if (descendants) {
|
|
1494
|
+
for (var i = 0, descendant; descendant = descendants[i]; i++) {
|
|
1495
|
+
descendant.style[name] = value;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
} else if (goog.userAgent.IE || goog.userAgent.OPERA) {
|
|
1499
|
+
// Toggle the 'unselectable' attribute on the element and its descendants.
|
|
1500
|
+
var value = unselectable ? 'on' : '';
|
|
1501
|
+
el.setAttribute('unselectable', value);
|
|
1502
|
+
if (descendants) {
|
|
1503
|
+
for (var i = 0, descendant; descendant = descendants[i]; i++) {
|
|
1504
|
+
descendant.setAttribute('unselectable', value);
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Gets the border box size for an element.
|
|
1513
|
+
* @param {Element} element The element to get the size for.
|
|
1514
|
+
* @return {!goog.math.Size} The border box size.
|
|
1515
|
+
*/
|
|
1516
|
+
goog.style.getBorderBoxSize = function(element) {
|
|
1517
|
+
return new goog.math.Size(element.offsetWidth, element.offsetHeight);
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* Sets the border box size of an element. This is potentially expensive in IE
|
|
1523
|
+
* if the document is CSS1Compat mode
|
|
1524
|
+
* @param {Element} element The element to set the size on.
|
|
1525
|
+
* @param {goog.math.Size} size The new size.
|
|
1526
|
+
*/
|
|
1527
|
+
goog.style.setBorderBoxSize = function(element, size) {
|
|
1528
|
+
var doc = goog.dom.getOwnerDocument(element);
|
|
1529
|
+
var isCss1CompatMode = goog.dom.getDomHelper(doc).isCss1CompatMode();
|
|
1530
|
+
|
|
1531
|
+
if (goog.userAgent.IE &&
|
|
1532
|
+
(!isCss1CompatMode || !goog.userAgent.isVersionOrHigher('8'))) {
|
|
1533
|
+
var style = element.style;
|
|
1534
|
+
if (isCss1CompatMode) {
|
|
1535
|
+
var paddingBox = goog.style.getPaddingBox(element);
|
|
1536
|
+
var borderBox = goog.style.getBorderBox(element);
|
|
1537
|
+
style.pixelWidth = size.width - borderBox.left - paddingBox.left -
|
|
1538
|
+
paddingBox.right - borderBox.right;
|
|
1539
|
+
style.pixelHeight = size.height - borderBox.top - paddingBox.top -
|
|
1540
|
+
paddingBox.bottom - borderBox.bottom;
|
|
1541
|
+
} else {
|
|
1542
|
+
style.pixelWidth = size.width;
|
|
1543
|
+
style.pixelHeight = size.height;
|
|
1544
|
+
}
|
|
1545
|
+
} else {
|
|
1546
|
+
goog.style.setBoxSizingSize_(element, size, 'border-box');
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Gets the content box size for an element. This is potentially expensive in
|
|
1553
|
+
* all browsers.
|
|
1554
|
+
* @param {Element} element The element to get the size for.
|
|
1555
|
+
* @return {!goog.math.Size} The content box size.
|
|
1556
|
+
*/
|
|
1557
|
+
goog.style.getContentBoxSize = function(element) {
|
|
1558
|
+
var doc = goog.dom.getOwnerDocument(element);
|
|
1559
|
+
var ieCurrentStyle = goog.userAgent.IE && element.currentStyle;
|
|
1560
|
+
if (ieCurrentStyle &&
|
|
1561
|
+
goog.dom.getDomHelper(doc).isCss1CompatMode() &&
|
|
1562
|
+
ieCurrentStyle.width != 'auto' && ieCurrentStyle.height != 'auto' &&
|
|
1563
|
+
!ieCurrentStyle.boxSizing) {
|
|
1564
|
+
// If IE in CSS1Compat mode than just use the width and height.
|
|
1565
|
+
// If we have a boxSizing then fall back on measuring the borders etc.
|
|
1566
|
+
var width = goog.style.getIePixelValue_(element, ieCurrentStyle.width,
|
|
1567
|
+
'width', 'pixelWidth');
|
|
1568
|
+
var height = goog.style.getIePixelValue_(element, ieCurrentStyle.height,
|
|
1569
|
+
'height', 'pixelHeight');
|
|
1570
|
+
return new goog.math.Size(width, height);
|
|
1571
|
+
} else {
|
|
1572
|
+
var borderBoxSize = goog.style.getBorderBoxSize(element);
|
|
1573
|
+
var paddingBox = goog.style.getPaddingBox(element);
|
|
1574
|
+
var borderBox = goog.style.getBorderBox(element);
|
|
1575
|
+
return new goog.math.Size(borderBoxSize.width -
|
|
1576
|
+
borderBox.left - paddingBox.left -
|
|
1577
|
+
paddingBox.right - borderBox.right,
|
|
1578
|
+
borderBoxSize.height -
|
|
1579
|
+
borderBox.top - paddingBox.top -
|
|
1580
|
+
paddingBox.bottom - borderBox.bottom);
|
|
1581
|
+
}
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Sets the content box size of an element. This is potentially expensive in IE
|
|
1587
|
+
* if the document is BackCompat mode.
|
|
1588
|
+
* @param {Element} element The element to set the size on.
|
|
1589
|
+
* @param {goog.math.Size} size The new size.
|
|
1590
|
+
*/
|
|
1591
|
+
goog.style.setContentBoxSize = function(element, size) {
|
|
1592
|
+
var doc = goog.dom.getOwnerDocument(element);
|
|
1593
|
+
var isCss1CompatMode = goog.dom.getDomHelper(doc).isCss1CompatMode();
|
|
1594
|
+
if (goog.userAgent.IE &&
|
|
1595
|
+
(!isCss1CompatMode || !goog.userAgent.isVersionOrHigher('8'))) {
|
|
1596
|
+
var style = element.style;
|
|
1597
|
+
if (isCss1CompatMode) {
|
|
1598
|
+
style.pixelWidth = size.width;
|
|
1599
|
+
style.pixelHeight = size.height;
|
|
1600
|
+
} else {
|
|
1601
|
+
var paddingBox = goog.style.getPaddingBox(element);
|
|
1602
|
+
var borderBox = goog.style.getBorderBox(element);
|
|
1603
|
+
style.pixelWidth = size.width + borderBox.left + paddingBox.left +
|
|
1604
|
+
paddingBox.right + borderBox.right;
|
|
1605
|
+
style.pixelHeight = size.height + borderBox.top + paddingBox.top +
|
|
1606
|
+
paddingBox.bottom + borderBox.bottom;
|
|
1607
|
+
}
|
|
1608
|
+
} else {
|
|
1609
|
+
goog.style.setBoxSizingSize_(element, size, 'content-box');
|
|
1610
|
+
}
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
/**
|
|
1615
|
+
* Helper function that sets the box sizing as well as the width and height
|
|
1616
|
+
* @param {Element} element The element to set the size on.
|
|
1617
|
+
* @param {goog.math.Size} size The new size to set.
|
|
1618
|
+
* @param {string} boxSizing The box-sizing value.
|
|
1619
|
+
* @private
|
|
1620
|
+
*/
|
|
1621
|
+
goog.style.setBoxSizingSize_ = function(element, size, boxSizing) {
|
|
1622
|
+
var style = element.style;
|
|
1623
|
+
if (goog.userAgent.GECKO) {
|
|
1624
|
+
style.MozBoxSizing = boxSizing;
|
|
1625
|
+
} else if (goog.userAgent.WEBKIT) {
|
|
1626
|
+
style.WebkitBoxSizing = boxSizing;
|
|
1627
|
+
} else {
|
|
1628
|
+
// Includes IE8 and Opera 9.50+
|
|
1629
|
+
style.boxSizing = boxSizing;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
// Setting this to a negative value will throw an exception on IE
|
|
1633
|
+
// (and doesn't do anything different than setting it to 0).
|
|
1634
|
+
style.width = Math.max(size.width, 0) + 'px';
|
|
1635
|
+
style.height = Math.max(size.height, 0) + 'px';
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* IE specific function that converts a non pixel unit to pixels.
|
|
1641
|
+
* @param {Element} element The element to convert the value for.
|
|
1642
|
+
* @param {string} value The current value as a string. The value must not be
|
|
1643
|
+
* ''.
|
|
1644
|
+
* @param {string} name The CSS property name to use for the converstion. This
|
|
1645
|
+
* should be 'left', 'top', 'width' or 'height'.
|
|
1646
|
+
* @param {string} pixelName The CSS pixel property name to use to get the
|
|
1647
|
+
* value in pixels.
|
|
1648
|
+
* @return {number} The value in pixels.
|
|
1649
|
+
* @private
|
|
1650
|
+
*/
|
|
1651
|
+
goog.style.getIePixelValue_ = function(element, value, name, pixelName) {
|
|
1652
|
+
// Try if we already have a pixel value. IE does not do half pixels so we
|
|
1653
|
+
// only check if it matches a number followed by 'px'.
|
|
1654
|
+
if (/^\d+px?$/.test(value)) {
|
|
1655
|
+
return parseInt(value, 10);
|
|
1656
|
+
} else {
|
|
1657
|
+
var oldStyleValue = element.style[name];
|
|
1658
|
+
var oldRuntimeValue = element.runtimeStyle[name];
|
|
1659
|
+
// set runtime style to prevent changes
|
|
1660
|
+
element.runtimeStyle[name] = element.currentStyle[name];
|
|
1661
|
+
element.style[name] = value;
|
|
1662
|
+
var pixelValue = element.style[pixelName];
|
|
1663
|
+
// restore
|
|
1664
|
+
element.style[name] = oldStyleValue;
|
|
1665
|
+
element.runtimeStyle[name] = oldRuntimeValue;
|
|
1666
|
+
return pixelValue;
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Helper function for getting the pixel padding or margin for IE.
|
|
1673
|
+
* @param {Element} element The element to get the padding for.
|
|
1674
|
+
* @param {string} propName The property name.
|
|
1675
|
+
* @return {number} The pixel padding.
|
|
1676
|
+
* @private
|
|
1677
|
+
*/
|
|
1678
|
+
goog.style.getIePixelDistance_ = function(element, propName) {
|
|
1679
|
+
var value = goog.style.getCascadedStyle(element, propName);
|
|
1680
|
+
return value ?
|
|
1681
|
+
goog.style.getIePixelValue_(element, value, 'left', 'pixelLeft') : 0;
|
|
1682
|
+
};
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Gets the computed paddings or margins (on all sides) in pixels.
|
|
1687
|
+
* @param {Element} element The element to get the padding for.
|
|
1688
|
+
* @param {string} stylePrefix Pass 'padding' to retrieve the padding box,
|
|
1689
|
+
* or 'margin' to retrieve the margin box.
|
|
1690
|
+
* @return {!goog.math.Box} The computed paddings or margins.
|
|
1691
|
+
* @private
|
|
1692
|
+
*/
|
|
1693
|
+
goog.style.getBox_ = function(element, stylePrefix) {
|
|
1694
|
+
if (goog.userAgent.IE) {
|
|
1695
|
+
var left = goog.style.getIePixelDistance_(element, stylePrefix + 'Left');
|
|
1696
|
+
var right = goog.style.getIePixelDistance_(element, stylePrefix + 'Right');
|
|
1697
|
+
var top = goog.style.getIePixelDistance_(element, stylePrefix + 'Top');
|
|
1698
|
+
var bottom = goog.style.getIePixelDistance_(
|
|
1699
|
+
element, stylePrefix + 'Bottom');
|
|
1700
|
+
return new goog.math.Box(top, right, bottom, left);
|
|
1701
|
+
} else {
|
|
1702
|
+
// On non-IE browsers, getComputedStyle is always non-null.
|
|
1703
|
+
var left = /** @type {string} */ (
|
|
1704
|
+
goog.style.getComputedStyle(element, stylePrefix + 'Left'));
|
|
1705
|
+
var right = /** @type {string} */ (
|
|
1706
|
+
goog.style.getComputedStyle(element, stylePrefix + 'Right'));
|
|
1707
|
+
var top = /** @type {string} */ (
|
|
1708
|
+
goog.style.getComputedStyle(element, stylePrefix + 'Top'));
|
|
1709
|
+
var bottom = /** @type {string} */ (
|
|
1710
|
+
goog.style.getComputedStyle(element, stylePrefix + 'Bottom'));
|
|
1711
|
+
|
|
1712
|
+
// NOTE(arv): Gecko can return floating point numbers for the computed
|
|
1713
|
+
// style values.
|
|
1714
|
+
return new goog.math.Box(parseFloat(top),
|
|
1715
|
+
parseFloat(right),
|
|
1716
|
+
parseFloat(bottom),
|
|
1717
|
+
parseFloat(left));
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Gets the computed paddings (on all sides) in pixels.
|
|
1724
|
+
* @param {Element} element The element to get the padding for.
|
|
1725
|
+
* @return {!goog.math.Box} The computed paddings.
|
|
1726
|
+
*/
|
|
1727
|
+
goog.style.getPaddingBox = function(element) {
|
|
1728
|
+
return goog.style.getBox_(element, 'padding');
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* Gets the computed margins (on all sides) in pixels.
|
|
1734
|
+
* @param {Element} element The element to get the margins for.
|
|
1735
|
+
* @return {!goog.math.Box} The computed margins.
|
|
1736
|
+
*/
|
|
1737
|
+
goog.style.getMarginBox = function(element) {
|
|
1738
|
+
return goog.style.getBox_(element, 'margin');
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* A map used to map the border width keywords to a pixel width.
|
|
1744
|
+
* @type {Object}
|
|
1745
|
+
* @private
|
|
1746
|
+
*/
|
|
1747
|
+
goog.style.ieBorderWidthKeywords_ = {
|
|
1748
|
+
'thin': 2,
|
|
1749
|
+
'medium': 4,
|
|
1750
|
+
'thick': 6
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Helper function for IE to get the pixel border.
|
|
1756
|
+
* @param {Element} element The element to get the pixel border for.
|
|
1757
|
+
* @param {string} prop The part of the property name.
|
|
1758
|
+
* @return {number} The value in pixels.
|
|
1759
|
+
* @private
|
|
1760
|
+
*/
|
|
1761
|
+
goog.style.getIePixelBorder_ = function(element, prop) {
|
|
1762
|
+
if (goog.style.getCascadedStyle(element, prop + 'Style') == 'none') {
|
|
1763
|
+
return 0;
|
|
1764
|
+
}
|
|
1765
|
+
var width = goog.style.getCascadedStyle(element, prop + 'Width');
|
|
1766
|
+
if (width in goog.style.ieBorderWidthKeywords_) {
|
|
1767
|
+
return goog.style.ieBorderWidthKeywords_[width];
|
|
1768
|
+
}
|
|
1769
|
+
return goog.style.getIePixelValue_(element, width, 'left', 'pixelLeft');
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* Gets the computed border widths (on all sides) in pixels
|
|
1775
|
+
* @param {Element} element The element to get the border widths for.
|
|
1776
|
+
* @return {!goog.math.Box} The computed border widths.
|
|
1777
|
+
*/
|
|
1778
|
+
goog.style.getBorderBox = function(element) {
|
|
1779
|
+
if (goog.userAgent.IE) {
|
|
1780
|
+
var left = goog.style.getIePixelBorder_(element, 'borderLeft');
|
|
1781
|
+
var right = goog.style.getIePixelBorder_(element, 'borderRight');
|
|
1782
|
+
var top = goog.style.getIePixelBorder_(element, 'borderTop');
|
|
1783
|
+
var bottom = goog.style.getIePixelBorder_(element, 'borderBottom');
|
|
1784
|
+
return new goog.math.Box(top, right, bottom, left);
|
|
1785
|
+
} else {
|
|
1786
|
+
// On non-IE browsers, getComputedStyle is always non-null.
|
|
1787
|
+
var left = /** @type {string} */ (
|
|
1788
|
+
goog.style.getComputedStyle(element, 'borderLeftWidth'));
|
|
1789
|
+
var right = /** @type {string} */ (
|
|
1790
|
+
goog.style.getComputedStyle(element, 'borderRightWidth'));
|
|
1791
|
+
var top = /** @type {string} */ (
|
|
1792
|
+
goog.style.getComputedStyle(element, 'borderTopWidth'));
|
|
1793
|
+
var bottom = /** @type {string} */ (
|
|
1794
|
+
goog.style.getComputedStyle(element, 'borderBottomWidth'));
|
|
1795
|
+
|
|
1796
|
+
return new goog.math.Box(parseFloat(top),
|
|
1797
|
+
parseFloat(right),
|
|
1798
|
+
parseFloat(bottom),
|
|
1799
|
+
parseFloat(left));
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* Returns the font face applied to a given node. Opera and IE should return
|
|
1806
|
+
* the font actually displayed. Firefox returns the author's most-preferred
|
|
1807
|
+
* font (whether the browser is capable of displaying it or not.)
|
|
1808
|
+
* @param {Element} el The element whose font family is returned.
|
|
1809
|
+
* @return {string} The font family applied to el.
|
|
1810
|
+
*/
|
|
1811
|
+
goog.style.getFontFamily = function(el) {
|
|
1812
|
+
var doc = goog.dom.getOwnerDocument(el);
|
|
1813
|
+
var font = '';
|
|
1814
|
+
if (doc.body.createTextRange) {
|
|
1815
|
+
var range = doc.body.createTextRange();
|
|
1816
|
+
range.moveToElementText(el);
|
|
1817
|
+
/** @preserveTry */
|
|
1818
|
+
try {
|
|
1819
|
+
font = range.queryCommandValue('FontName');
|
|
1820
|
+
} catch (e) {
|
|
1821
|
+
// This is a workaround for a awkward exception.
|
|
1822
|
+
// On some IE, there is an exception coming from it.
|
|
1823
|
+
// The error description from this exception is:
|
|
1824
|
+
// This window has already been registered as a drop target
|
|
1825
|
+
// This is bogus description, likely due to a bug in ie.
|
|
1826
|
+
font = '';
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
if (!font) {
|
|
1830
|
+
// Note if for some reason IE can't derive FontName with a TextRange, we
|
|
1831
|
+
// fallback to using currentStyle
|
|
1832
|
+
font = goog.style.getStyle_(el, 'fontFamily');
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
// Firefox returns the applied font-family string (author's list of
|
|
1836
|
+
// preferred fonts.) We want to return the most-preferred font, in lieu of
|
|
1837
|
+
// the *actually* applied font.
|
|
1838
|
+
var fontsArray = font.split(',');
|
|
1839
|
+
if (fontsArray.length > 1) font = fontsArray[0];
|
|
1840
|
+
|
|
1841
|
+
// Sanitize for x-browser consistency:
|
|
1842
|
+
// Strip quotes because browsers aren't consistent with how they're
|
|
1843
|
+
// applied; Opera always encloses, Firefox sometimes, and IE never.
|
|
1844
|
+
return goog.string.stripQuotes(font, '"\'');
|
|
1845
|
+
};
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* Regular expression used for getLengthUnits.
|
|
1850
|
+
* @type {RegExp}
|
|
1851
|
+
* @private
|
|
1852
|
+
*/
|
|
1853
|
+
goog.style.lengthUnitRegex_ = /[^\d]+$/;
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
/**
|
|
1857
|
+
* Returns the units used for a CSS length measurement.
|
|
1858
|
+
* @param {string} value A CSS length quantity.
|
|
1859
|
+
* @return {?string} The units of measurement.
|
|
1860
|
+
*/
|
|
1861
|
+
goog.style.getLengthUnits = function(value) {
|
|
1862
|
+
var units = value.match(goog.style.lengthUnitRegex_);
|
|
1863
|
+
return units && units[0] || null;
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* Map of absolute CSS length units
|
|
1869
|
+
* @type {Object}
|
|
1870
|
+
* @private
|
|
1871
|
+
*/
|
|
1872
|
+
goog.style.ABSOLUTE_CSS_LENGTH_UNITS_ = {
|
|
1873
|
+
'cm' : 1,
|
|
1874
|
+
'in' : 1,
|
|
1875
|
+
'mm' : 1,
|
|
1876
|
+
'pc' : 1,
|
|
1877
|
+
'pt' : 1
|
|
1878
|
+
};
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* Map of relative CSS length units that can be accurately converted to px
|
|
1883
|
+
* font-size values using getIePixelValue_. Only units that are defined in
|
|
1884
|
+
* relation to a font size are convertible (%, small, etc. are not).
|
|
1885
|
+
* @type {Object}
|
|
1886
|
+
* @private
|
|
1887
|
+
*/
|
|
1888
|
+
goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_ = {
|
|
1889
|
+
'em' : 1,
|
|
1890
|
+
'ex' : 1
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* Returns the font size, in pixels, of text in an element.
|
|
1896
|
+
* @param {Element} el The element whose font size is returned.
|
|
1897
|
+
* @return {number} The font size (in pixels).
|
|
1898
|
+
*/
|
|
1899
|
+
goog.style.getFontSize = function(el) {
|
|
1900
|
+
var fontSize = goog.style.getStyle_(el, 'fontSize');
|
|
1901
|
+
var sizeUnits = goog.style.getLengthUnits(fontSize);
|
|
1902
|
+
if (fontSize && 'px' == sizeUnits) {
|
|
1903
|
+
// NOTE(user): This could be parseFloat instead, but IE doesn't return
|
|
1904
|
+
// decimal fractions in getStyle_ and Firefox reports the fractions, but
|
|
1905
|
+
// ignores them when rendering. Interestingly enough, when we force the
|
|
1906
|
+
// issue and size something to e.g., 50% of 25px, the browsers round in
|
|
1907
|
+
// opposite directions with Firefox reporting 12px and IE 13px. I punt.
|
|
1908
|
+
return parseInt(fontSize, 10);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
// In IE, we can convert absolute length units to a px value using
|
|
1912
|
+
// goog.style.getIePixelValue_. Units defined in relation to a font size
|
|
1913
|
+
// (em, ex) are applied relative to the element's parentNode and can also
|
|
1914
|
+
// be converted.
|
|
1915
|
+
if (goog.userAgent.IE) {
|
|
1916
|
+
if (sizeUnits in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) {
|
|
1917
|
+
return goog.style.getIePixelValue_(el,
|
|
1918
|
+
fontSize,
|
|
1919
|
+
'left',
|
|
1920
|
+
'pixelLeft');
|
|
1921
|
+
} else if (el.parentNode &&
|
|
1922
|
+
el.parentNode.nodeType == goog.dom.NodeType.ELEMENT &&
|
|
1923
|
+
sizeUnits in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) {
|
|
1924
|
+
// Check the parent size - if it is the same it means the relative size
|
|
1925
|
+
// value is inherited and we therefore don't want to count it twice. If
|
|
1926
|
+
// it is different, this element either has explicit style or has a CSS
|
|
1927
|
+
// rule applying to it.
|
|
1928
|
+
var parentElement = /** @type {Element} */ (el.parentNode);
|
|
1929
|
+
var parentSize = goog.style.getStyle_(parentElement, 'fontSize');
|
|
1930
|
+
return goog.style.getIePixelValue_(parentElement,
|
|
1931
|
+
fontSize == parentSize ?
|
|
1932
|
+
'1em' : fontSize,
|
|
1933
|
+
'left',
|
|
1934
|
+
'pixelLeft');
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
// Sometimes we can't cleanly find the font size (some units relative to a
|
|
1939
|
+
// node's parent's font size are difficult: %, smaller et al), so we create
|
|
1940
|
+
// an invisible, absolutely-positioned span sized to be the height of an 'M'
|
|
1941
|
+
// rendered in its parent's (i.e., our target element's) font size. This is
|
|
1942
|
+
// the definition of CSS's font size attribute.
|
|
1943
|
+
var sizeElement = goog.dom.createDom(
|
|
1944
|
+
'span',
|
|
1945
|
+
{'style': 'visibility:hidden;position:absolute;' +
|
|
1946
|
+
'line-height:0;padding:0;margin:0;border:0;height:1em;'});
|
|
1947
|
+
goog.dom.appendChild(el, sizeElement);
|
|
1948
|
+
fontSize = sizeElement.offsetHeight;
|
|
1949
|
+
goog.dom.removeNode(sizeElement);
|
|
1950
|
+
|
|
1951
|
+
return fontSize;
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* Parses a style attribute value. Converts CSS property names to camel case.
|
|
1957
|
+
* @param {string} value The style attribute value.
|
|
1958
|
+
* @return {!Object} Map of CSS properties to string values.
|
|
1959
|
+
*/
|
|
1960
|
+
goog.style.parseStyleAttribute = function(value) {
|
|
1961
|
+
var result = {};
|
|
1962
|
+
goog.array.forEach(value.split(/\s*;\s*/), function(pair) {
|
|
1963
|
+
var keyValue = pair.split(/\s*:\s*/);
|
|
1964
|
+
if (keyValue.length == 2) {
|
|
1965
|
+
result[goog.string.toCamelCase(keyValue[0].toLowerCase())] = keyValue[1];
|
|
1966
|
+
}
|
|
1967
|
+
});
|
|
1968
|
+
return result;
|
|
1969
|
+
};
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* Reverse of parseStyleAttribute; that is, takes a style object and returns the
|
|
1974
|
+
* corresponding attribute value. Converts camel case property names to proper
|
|
1975
|
+
* CSS selector names.
|
|
1976
|
+
* @param {Object} obj Map of CSS properties to values.
|
|
1977
|
+
* @return {string} The style attribute value.
|
|
1978
|
+
*/
|
|
1979
|
+
goog.style.toStyleAttribute = function(obj) {
|
|
1980
|
+
var buffer = [];
|
|
1981
|
+
goog.object.forEach(obj, function(value, key) {
|
|
1982
|
+
buffer.push(goog.string.toSelectorCase(key), ':', value, ';');
|
|
1983
|
+
});
|
|
1984
|
+
return buffer.join('');
|
|
1985
|
+
};
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Sets CSS float property on an element.
|
|
1990
|
+
* @param {Element} el The element to set float property on.
|
|
1991
|
+
* @param {string} value The value of float CSS property to set on this element.
|
|
1992
|
+
*/
|
|
1993
|
+
goog.style.setFloat = function(el, value) {
|
|
1994
|
+
el.style[goog.userAgent.IE ? 'styleFloat' : 'cssFloat'] = value;
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Gets value of explicitly-set float CSS property on an element.
|
|
2000
|
+
* @param {Element} el The element to get float property of.
|
|
2001
|
+
* @return {string} The value of explicitly-set float CSS property on this
|
|
2002
|
+
* element.
|
|
2003
|
+
*/
|
|
2004
|
+
goog.style.getFloat = function(el) {
|
|
2005
|
+
return el.style[goog.userAgent.IE ? 'styleFloat' : 'cssFloat'] || '';
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
/**
|
|
2010
|
+
* Returns the scroll bar width (represents the width of both horizontal
|
|
2011
|
+
* and vertical scroll).
|
|
2012
|
+
*
|
|
2013
|
+
* @param {string=} opt_className An optional class name (or names) to apply
|
|
2014
|
+
* to the invisible div created to measure the scrollbar. This is necessary
|
|
2015
|
+
* if some scrollbars are styled differently than others.
|
|
2016
|
+
* @return {number} The scroll bar width in px.
|
|
2017
|
+
*/
|
|
2018
|
+
goog.style.getScrollbarWidth = function(opt_className) {
|
|
2019
|
+
// Add two hidden divs. The child div is larger than the parent and
|
|
2020
|
+
// forces scrollbars to appear on it.
|
|
2021
|
+
// Using overflow:scroll does not work consistently with scrollbars that
|
|
2022
|
+
// are styled with ::-webkit-scrollbar.
|
|
2023
|
+
var outerDiv = goog.dom.createElement('div');
|
|
2024
|
+
if (opt_className) {
|
|
2025
|
+
outerDiv.className = opt_className;
|
|
2026
|
+
}
|
|
2027
|
+
outerDiv.style.cssText = 'overflow:auto;' +
|
|
2028
|
+
'position:absolute;top:0;width:100px;height:100px';
|
|
2029
|
+
var innerDiv = goog.dom.createElement('div');
|
|
2030
|
+
goog.style.setSize(innerDiv, '200px', '200px');
|
|
2031
|
+
outerDiv.appendChild(innerDiv);
|
|
2032
|
+
goog.dom.appendChild(goog.dom.getDocument().body, outerDiv);
|
|
2033
|
+
var width = outerDiv.offsetWidth - outerDiv.clientWidth;
|
|
2034
|
+
goog.dom.removeNode(outerDiv);
|
|
2035
|
+
return width;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
/**
|
|
2040
|
+
* Regular expression to extract x and y translation components from a CSS
|
|
2041
|
+
* transform Matrix representation.
|
|
2042
|
+
*
|
|
2043
|
+
* @type {!RegExp}
|
|
2044
|
+
* @const
|
|
2045
|
+
* @private
|
|
2046
|
+
*/
|
|
2047
|
+
goog.style.MATRIX_TRANSLATION_REGEX_ =
|
|
2048
|
+
new RegExp('matrix\\([0-9\\.\\-]+, [0-9\\.\\-]+, ' +
|
|
2049
|
+
'[0-9\\.\\-]+, [0-9\\.\\-]+, ' +
|
|
2050
|
+
'([0-9\\.\\-]+)p?x?, ([0-9\\.\\-]+)p?x?\\)');
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
/**
|
|
2054
|
+
* Returns the x,y translation component of any CSS transforms applied to the
|
|
2055
|
+
* element, in pixels.
|
|
2056
|
+
*
|
|
2057
|
+
* @param {!Element} element The element to get the translation of.
|
|
2058
|
+
* @return {!goog.math.Coordinate} The CSS translation of the element in px.
|
|
2059
|
+
*/
|
|
2060
|
+
goog.style.getCssTranslation = function(element) {
|
|
2061
|
+
var property;
|
|
2062
|
+
if (goog.userAgent.IE) {
|
|
2063
|
+
property = '-ms-transform';
|
|
2064
|
+
} else if (goog.userAgent.WEBKIT) {
|
|
2065
|
+
property = '-webkit-transform';
|
|
2066
|
+
} else if (goog.userAgent.OPERA) {
|
|
2067
|
+
property = '-o-transform';
|
|
2068
|
+
} else if (goog.userAgent.GECKO) {
|
|
2069
|
+
property = '-moz-transform';
|
|
2070
|
+
}
|
|
2071
|
+
var transform;
|
|
2072
|
+
if (property) {
|
|
2073
|
+
transform = goog.style.getStyle_(element, property);
|
|
2074
|
+
}
|
|
2075
|
+
if (!transform) {
|
|
2076
|
+
transform = goog.style.getStyle_(element, 'transform');
|
|
2077
|
+
}
|
|
2078
|
+
if (!transform) {
|
|
2079
|
+
return new goog.math.Coordinate(0, 0);
|
|
2080
|
+
}
|
|
2081
|
+
var matches = transform.match(goog.style.MATRIX_TRANSLATION_REGEX_);
|
|
2082
|
+
if (!matches) {
|
|
2083
|
+
return new goog.math.Coordinate(0, 0);
|
|
2084
|
+
}
|
|
2085
|
+
return new goog.math.Coordinate(parseFloat(matches[1]),
|
|
2086
|
+
parseFloat(matches[2]));
|
|
2087
|
+
};
|