k4compiler 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,137 @@
|
|
1
|
+
<html>
|
2
|
+
<!--
|
3
|
+
Copyright 2008 The Closure Library Authors. All Rights Reserved.
|
4
|
+
|
5
|
+
Use of this source code is governed by the Apache License, Version 2.0.
|
6
|
+
See the COPYING file for details.
|
7
|
+
|
8
|
+
@author nicksantos@google.com (Nick Santos)
|
9
|
+
-->
|
10
|
+
<head>
|
11
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
12
|
+
<title>goog.editor.ClickToEditWrapper Unit Tests</title>
|
13
|
+
<script src='../base.js'></script>
|
14
|
+
<script>
|
15
|
+
goog.require('goog.editor.ClickToEditWrapper');
|
16
|
+
goog.require('goog.editor.Field');
|
17
|
+
goog.require('goog.editor.SeamlessField');
|
18
|
+
goog.require('goog.testing.events');
|
19
|
+
goog.require('goog.testing.jsunit');
|
20
|
+
goog.require('goog.testing.MockClock');
|
21
|
+
</script>
|
22
|
+
</head>
|
23
|
+
<body>
|
24
|
+
<div id='root'>
|
25
|
+
<div id="testField">I am text with a
|
26
|
+
<a id='testAnchor' href='http://www.google.com'>link</a>.</div>
|
27
|
+
</div>
|
28
|
+
<script>
|
29
|
+
|
30
|
+
var FIELD;
|
31
|
+
var CLOCK;
|
32
|
+
var HTML;
|
33
|
+
|
34
|
+
function setUp() {
|
35
|
+
HTML = goog.dom.getElement('root').innerHTML;
|
36
|
+
CLOCK = new goog.testing.MockClock(true);
|
37
|
+
|
38
|
+
// The following 3 lines are to get around an IE bug where it says
|
39
|
+
// 'Incompatible markup pointers for this operation'.
|
40
|
+
// Must be done in the setup, not teardown, or else it won't take effect for
|
41
|
+
// the first test that is run, or any test that runs immediately after a
|
42
|
+
// "breaking async" message from the jsunit framework.
|
43
|
+
goog.dom.Range.clearSelection();
|
44
|
+
window.blur();
|
45
|
+
window.focus();
|
46
|
+
}
|
47
|
+
|
48
|
+
function setUpField(opt_isBlended) {
|
49
|
+
FIELD = opt_isBlended ? new goog.editor.SeamlessField('testField') :
|
50
|
+
new goog.editor.SeamlessField('testField');
|
51
|
+
|
52
|
+
(new goog.editor.ClickToEditWrapper(FIELD));
|
53
|
+
|
54
|
+
goog.dom.Range.clearSelection();
|
55
|
+
}
|
56
|
+
|
57
|
+
function tearDown() {
|
58
|
+
if (FIELD) {
|
59
|
+
FIELD.dispose();
|
60
|
+
}
|
61
|
+
|
62
|
+
CLOCK.dispose();
|
63
|
+
|
64
|
+
goog.dom.getElement('root').innerHTML = HTML;
|
65
|
+
}
|
66
|
+
|
67
|
+
function testClickToEdit(opt_isBlended) {
|
68
|
+
setUpField(opt_isBlended);
|
69
|
+
|
70
|
+
var text = goog.dom.getElement('testField').firstChild;
|
71
|
+
goog.dom.Range.createFromNodes(text, 4, text, 8).select();
|
72
|
+
|
73
|
+
goog.testing.events.fireClickSequence(text.parentNode);
|
74
|
+
|
75
|
+
assertFalse('Field should not be made editable immediately after clicking',
|
76
|
+
FIELD.isLoaded());
|
77
|
+
CLOCK.tick(1);
|
78
|
+
assertTrue('Field should be editable', FIELD.isLoaded());
|
79
|
+
|
80
|
+
var dom = FIELD.getEditableDomHelper();
|
81
|
+
var selection = goog.dom.Range.createFromWindow(dom.getWindow());
|
82
|
+
|
83
|
+
var body = FIELD.getElement();
|
84
|
+
text = body.firstChild;
|
85
|
+
|
86
|
+
assertEquals('Wrong start node', text, selection.getStartNode());
|
87
|
+
assertEquals('Wrong end node', text, selection.getEndNode());
|
88
|
+
assertEquals('Wrong start offset', 4, selection.getStartOffset());
|
89
|
+
assertEquals('Wrong end offset', 8, selection.getEndOffset());
|
90
|
+
}
|
91
|
+
|
92
|
+
function testBlendedClickToEdit() {
|
93
|
+
testClickToEdit(true);
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
function testClickToEditWithAnchor(opt_isBlended) {
|
98
|
+
// We bail out if we are running on chrome+winxp because of flaky selenium
|
99
|
+
// issues. TODO(user): Remove this assertion once we start running on the
|
100
|
+
// JsUnit farm.
|
101
|
+
if (goog.userAgent.product.CHROME && goog.userAgent.WINDOWS) {
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
setUpField(opt_isBlended);
|
105
|
+
|
106
|
+
goog.dom.getElement('testAnchor').focus();
|
107
|
+
goog.testing.events.fireClickSequence(goog.dom.getElement('testAnchor'));
|
108
|
+
|
109
|
+
CLOCK.tick(1);
|
110
|
+
assertTrue('Field should be editable', FIELD.isLoaded());
|
111
|
+
|
112
|
+
var dom = FIELD.getEditableDomHelper();
|
113
|
+
var selection = goog.dom.Range.createFromWindow(dom.getWindow());
|
114
|
+
|
115
|
+
// IE and Gecko and Safari are all dumb and put the cursor
|
116
|
+
// in different places.
|
117
|
+
var body = FIELD.getElement();
|
118
|
+
var text = body.firstChild;
|
119
|
+
var link = dom.getElementsByTagNameAndClass('A', null, body)[0].firstChild;
|
120
|
+
var isIEorWebkit = goog.userAgent.WEBKIT || goog.userAgent.IE;
|
121
|
+
assertEquals('Wrong start node',
|
122
|
+
isIEorWebkit ? text : link, selection.getStartNode());
|
123
|
+
assertEquals('Wrong start offset',
|
124
|
+
isIEorWebkit ? 17 : 0, selection.getStartOffset());
|
125
|
+
assertEquals('Wrong end node',
|
126
|
+
isIEorWebkit ? text : link, selection.getEndNode());
|
127
|
+
assertEquals('Wrong end offset',
|
128
|
+
isIEorWebkit ? 17 : 0, selection.getEndOffset());
|
129
|
+
}
|
130
|
+
|
131
|
+
function testBlendedClickToEditWithAnchor() {
|
132
|
+
testClickToEditWithAnchor(true);
|
133
|
+
}
|
134
|
+
|
135
|
+
</script>
|
136
|
+
</body>
|
137
|
+
</html>
|
@@ -0,0 +1,76 @@
|
|
1
|
+
// Copyright 2009 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 Commands that the editor can execute.
|
17
|
+
* @see ../demos/editor/editor.html
|
18
|
+
*/
|
19
|
+
goog.provide('goog.editor.Command');
|
20
|
+
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Commands that the editor can excute via execCommand or queryCommandValue.
|
24
|
+
* @enum {string}
|
25
|
+
*/
|
26
|
+
goog.editor.Command = {
|
27
|
+
// Prepend all the strings of built in execCommands with a plus to ensure
|
28
|
+
// that there's no conflict if a client wants to use the
|
29
|
+
// browser's execCommand.
|
30
|
+
UNDO: '+undo',
|
31
|
+
REDO: '+redo',
|
32
|
+
LINK: '+link',
|
33
|
+
FORMAT_BLOCK: '+formatBlock',
|
34
|
+
INDENT: '+indent',
|
35
|
+
OUTDENT: '+outdent',
|
36
|
+
REMOVE_FORMAT: '+removeFormat',
|
37
|
+
STRIKE_THROUGH: '+strikeThrough',
|
38
|
+
HORIZONTAL_RULE: '+insertHorizontalRule',
|
39
|
+
SUBSCRIPT: '+subscript',
|
40
|
+
SUPERSCRIPT: '+superscript',
|
41
|
+
UNDERLINE: '+underline',
|
42
|
+
BOLD: '+bold',
|
43
|
+
ITALIC: '+italic',
|
44
|
+
FONT_SIZE: '+fontSize',
|
45
|
+
FONT_FACE: '+fontName',
|
46
|
+
FONT_COLOR: '+foreColor',
|
47
|
+
EMOTICON: '+emoticon',
|
48
|
+
EQUATION: '+equation',
|
49
|
+
BACKGROUND_COLOR: '+backColor',
|
50
|
+
ORDERED_LIST: '+insertOrderedList',
|
51
|
+
UNORDERED_LIST: '+insertUnorderedList',
|
52
|
+
TABLE: '+table',
|
53
|
+
JUSTIFY_CENTER: '+justifyCenter',
|
54
|
+
JUSTIFY_FULL: '+justifyFull',
|
55
|
+
JUSTIFY_RIGHT: '+justifyRight',
|
56
|
+
JUSTIFY_LEFT: '+justifyLeft',
|
57
|
+
BLOCKQUOTE: '+BLOCKQUOTE', // This is a nodename. Should be all caps.
|
58
|
+
DIR_LTR: 'ltr', // should be exactly 'ltr' as it becomes dir attribute value
|
59
|
+
DIR_RTL: 'rtl', // same here
|
60
|
+
IMAGE: 'image',
|
61
|
+
EDIT_HTML: 'editHtml',
|
62
|
+
UPDATE_LINK_BUBBLE: 'updateLinkBubble',
|
63
|
+
|
64
|
+
// queryCommandValue only: returns the default tag name used in the field.
|
65
|
+
// DIV should be considered the default if no plugin responds.
|
66
|
+
DEFAULT_TAG: '+defaultTag',
|
67
|
+
|
68
|
+
// TODO(nicksantos): Try to give clients an API so that they don't need
|
69
|
+
// these execCommands.
|
70
|
+
CLEAR_LOREM: 'clearlorem',
|
71
|
+
UPDATE_LOREM: 'updatelorem',
|
72
|
+
USING_LOREM: 'usinglorem',
|
73
|
+
|
74
|
+
// Modal editor commands (usually dialogs).
|
75
|
+
MODAL_LINK_EDITOR: 'link'
|
76
|
+
};
|
@@ -0,0 +1,110 @@
|
|
1
|
+
// Copyright 2012 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 Class to encapsulate an editable field that blends into the
|
17
|
+
* style of the page and never uses an iframe. The field's height can be
|
18
|
+
* controlled by CSS styles like min-height, max-height, and overflow. This is
|
19
|
+
* a goog.editor.Field, but overrides everything iframe related to use
|
20
|
+
* contentEditable divs. This is essentially a much lighter alternative to
|
21
|
+
* goog.editor.SeamlessField, but only works in Firefox 3+, and only works
|
22
|
+
* *well* in Firefox 12+ due to
|
23
|
+
* https://bugzilla.mozilla.org/show_bug.cgi?id=669026.
|
24
|
+
*
|
25
|
+
* @author gboyer@google.com (Garrett Boyer)
|
26
|
+
* @author jparent@google.com (Julie Parent)
|
27
|
+
* @author nicksantos@google.com (Nick Santos)
|
28
|
+
* @author ojan@google.com (Ojan Vafai)
|
29
|
+
*/
|
30
|
+
|
31
|
+
|
32
|
+
goog.provide('goog.editor.ContentEditableField');
|
33
|
+
|
34
|
+
goog.require('goog.asserts');
|
35
|
+
goog.require('goog.editor.Field');
|
36
|
+
goog.require('goog.log');
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
/**
|
41
|
+
* This class encapsulates an editable field that is just a contentEditable
|
42
|
+
* div.
|
43
|
+
*
|
44
|
+
* To see events fired by this object, please see the base class.
|
45
|
+
*
|
46
|
+
* @param {string} id An identifer for the field. This is used to find the
|
47
|
+
* field and the element associated with this field.
|
48
|
+
* @param {Document=} opt_doc The document that the element with the given
|
49
|
+
* id can be found in.
|
50
|
+
* @constructor
|
51
|
+
* @extends {goog.editor.Field}
|
52
|
+
*/
|
53
|
+
goog.editor.ContentEditableField = function(id, opt_doc) {
|
54
|
+
goog.editor.Field.call(this, id, opt_doc);
|
55
|
+
};
|
56
|
+
goog.inherits(goog.editor.ContentEditableField, goog.editor.Field);
|
57
|
+
|
58
|
+
|
59
|
+
/**
|
60
|
+
* @override
|
61
|
+
*/
|
62
|
+
goog.editor.ContentEditableField.prototype.logger =
|
63
|
+
goog.log.getLogger('goog.editor.ContentEditableField');
|
64
|
+
|
65
|
+
|
66
|
+
/** @override */
|
67
|
+
goog.editor.ContentEditableField.prototype.usesIframe = function() {
|
68
|
+
// Never uses an iframe in any browser.
|
69
|
+
return false;
|
70
|
+
};
|
71
|
+
|
72
|
+
|
73
|
+
// Overridden to improve dead code elimination only.
|
74
|
+
/** @override */
|
75
|
+
goog.editor.ContentEditableField.prototype.turnOnDesignModeGecko =
|
76
|
+
goog.nullFunction;
|
77
|
+
|
78
|
+
|
79
|
+
/** @override */
|
80
|
+
goog.editor.ContentEditableField.prototype.installStyles = function() {
|
81
|
+
goog.asserts.assert(!this.cssStyles, 'ContentEditableField does not support' +
|
82
|
+
' CSS styles; instead just write plain old CSS on the main page.');
|
83
|
+
};
|
84
|
+
|
85
|
+
|
86
|
+
/** @override */
|
87
|
+
goog.editor.ContentEditableField.prototype.makeEditableInternal = function(
|
88
|
+
opt_iframeSrc) {
|
89
|
+
var field = this.getOriginalElement();
|
90
|
+
if (field) {
|
91
|
+
this.setupFieldObject(field);
|
92
|
+
// TODO(gboyer): Allow clients/plugins to override with 'plaintext-only'
|
93
|
+
// for WebKit.
|
94
|
+
field.contentEditable = true;
|
95
|
+
|
96
|
+
this.injectContents(field.innerHTML, field);
|
97
|
+
|
98
|
+
this.handleFieldLoad();
|
99
|
+
}
|
100
|
+
};
|
101
|
+
|
102
|
+
|
103
|
+
/**
|
104
|
+
* @override
|
105
|
+
*
|
106
|
+
* ContentEditableField does not make any changes to the DOM when it is made
|
107
|
+
* editable other than setting contentEditable to true.
|
108
|
+
*/
|
109
|
+
goog.editor.ContentEditableField.prototype.restoreDom =
|
110
|
+
goog.nullFunction;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<!--
|
2
|
+
All Rights Reserved.
|
3
|
+
|
4
|
+
Tests for goog.editor.ContentEditableField
|
5
|
+
|
6
|
+
@author gboyer@google.com (Garrett Boyer)
|
7
|
+
--><html>
|
8
|
+
<!--
|
9
|
+
Copyright 2012 The Closure Library Authors. All Rights Reserved.
|
10
|
+
|
11
|
+
Use of this source code is governed by the Apache License, Version 2.0.
|
12
|
+
See the COPYING file for details.
|
13
|
+
-->
|
14
|
+
<head>
|
15
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
16
|
+
<title>Editor Unit Tests - goog.editor.ContentEditableField</title>
|
17
|
+
<script src='../base.js'></script>
|
18
|
+
<script>
|
19
|
+
goog.require('goog.dom');
|
20
|
+
goog.require('goog.editor.ContentEditableField');
|
21
|
+
goog.require('goog.editor.field_test');
|
22
|
+
goog.require('goog.testing.jsunit');
|
23
|
+
</script>
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
<div id="parent"></div>
|
27
|
+
<script>
|
28
|
+
FieldConstructor = goog.editor.ContentEditableField;
|
29
|
+
|
30
|
+
function testNoIframeAndSameElement() {
|
31
|
+
var field = new goog.editor.ContentEditableField('testField');
|
32
|
+
field.makeEditable();
|
33
|
+
assertFalse(field.usesIframe());
|
34
|
+
assertEquals('Original element should equal field element',
|
35
|
+
field.getOriginalElement(), field.getElement());
|
36
|
+
assertEquals('Sanity check on original element',
|
37
|
+
'testField', field.getOriginalElement().id);
|
38
|
+
assertEquals('Editable document should be same as main document',
|
39
|
+
document, field.getEditableDomHelper().getDocument());
|
40
|
+
field.dispose();
|
41
|
+
}
|
42
|
+
|
43
|
+
function testMakeEditableAndUnEditable() {
|
44
|
+
var elem = goog.dom.getElement('testField');
|
45
|
+
goog.dom.setTextContent(elem, 'Hello world');
|
46
|
+
var field = new goog.editor.ContentEditableField('testField');
|
47
|
+
|
48
|
+
field.makeEditable();
|
49
|
+
assertEquals('true', String(elem.contentEditable));
|
50
|
+
assertEquals('Hello world', goog.dom.getTextContent(elem));
|
51
|
+
field.setHtml(false /* addParas */, 'Goodbye world');
|
52
|
+
assertEquals('Goodbye world', goog.dom.getTextContent(elem));
|
53
|
+
|
54
|
+
field.makeUneditable();
|
55
|
+
assertNotEquals('true', String(elem.contentEditable));
|
56
|
+
assertEquals('Goodbye world', goog.dom.getTextContent(elem));
|
57
|
+
field.dispose();
|
58
|
+
}
|
59
|
+
</script>
|
60
|
+
</body>
|
61
|
+
</html>
|
62
|
+
</html>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Copyright 2008 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 Text editor constants for compile time feature selection.
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
|
20
|
+
goog.provide('goog.editor.defines');
|
21
|
+
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @define {boolean} Use contentEditable in FF.
|
25
|
+
* There are a number of known bugs when the only content in your field is
|
26
|
+
* inline (e.g. just text, no block elements):
|
27
|
+
* -indent is a noop and then DOMSubtreeModified events stop firing until
|
28
|
+
* the structure of the DOM is changed (e.g. make something bold).
|
29
|
+
* -inserting lists inserts just a NBSP, no list!
|
30
|
+
* Once those two are fixed, we should have one client guinea pig it and put
|
31
|
+
* it through a QA run. If we can file the bugs with Mozilla, there's a chance
|
32
|
+
* they'll fix them for a dot release of Firefox 3.
|
33
|
+
*/
|
34
|
+
goog.define('goog.editor.defines.USE_CONTENTEDITABLE_IN_FIREFOX_3', false);
|
@@ -0,0 +1,2725 @@
|
|
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
|
+
// All Rights Reserved.
|
15
|
+
|
16
|
+
/**
|
17
|
+
* @fileoverview Class to encapsulate an editable field. Always uses an
|
18
|
+
* iframe to contain the editable area, never inherits the style of the
|
19
|
+
* surrounding page, and is always a fixed height.
|
20
|
+
*
|
21
|
+
* @see ../demos/editor/editor.html
|
22
|
+
* @see ../demos/editor/field_basic.html
|
23
|
+
*/
|
24
|
+
|
25
|
+
goog.provide('goog.editor.Field');
|
26
|
+
goog.provide('goog.editor.Field.EventType');
|
27
|
+
|
28
|
+
goog.require('goog.a11y.aria');
|
29
|
+
goog.require('goog.a11y.aria.Role');
|
30
|
+
goog.require('goog.array');
|
31
|
+
goog.require('goog.asserts');
|
32
|
+
goog.require('goog.async.Delay');
|
33
|
+
goog.require('goog.dom');
|
34
|
+
goog.require('goog.dom.Range');
|
35
|
+
goog.require('goog.dom.TagName');
|
36
|
+
goog.require('goog.editor.BrowserFeature');
|
37
|
+
goog.require('goog.editor.Command');
|
38
|
+
goog.require('goog.editor.Plugin');
|
39
|
+
goog.require('goog.editor.icontent');
|
40
|
+
goog.require('goog.editor.icontent.FieldFormatInfo');
|
41
|
+
goog.require('goog.editor.icontent.FieldStyleInfo');
|
42
|
+
goog.require('goog.editor.node');
|
43
|
+
goog.require('goog.editor.range');
|
44
|
+
goog.require('goog.events');
|
45
|
+
goog.require('goog.events.EventHandler');
|
46
|
+
goog.require('goog.events.EventTarget');
|
47
|
+
goog.require('goog.events.EventType');
|
48
|
+
goog.require('goog.events.KeyCodes');
|
49
|
+
goog.require('goog.functions');
|
50
|
+
goog.require('goog.log');
|
51
|
+
goog.require('goog.string');
|
52
|
+
goog.require('goog.string.Unicode');
|
53
|
+
goog.require('goog.style');
|
54
|
+
goog.require('goog.userAgent');
|
55
|
+
goog.require('goog.userAgent.product');
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
/**
|
60
|
+
* This class encapsulates an editable field.
|
61
|
+
*
|
62
|
+
* event: load Fires when the field is loaded
|
63
|
+
* event: unload Fires when the field is unloaded (made not editable)
|
64
|
+
*
|
65
|
+
* event: beforechange Fires before the content of the field might change
|
66
|
+
*
|
67
|
+
* event: delayedchange Fires a short time after field has changed. If multiple
|
68
|
+
* change events happen really close to each other only
|
69
|
+
* the last one will trigger the delayedchange event.
|
70
|
+
*
|
71
|
+
* event: beforefocus Fires before the field becomes active
|
72
|
+
* event: focus Fires when the field becomes active. Fires after the blur event
|
73
|
+
* event: blur Fires when the field becomes inactive
|
74
|
+
*
|
75
|
+
* TODO: figure out if blur or beforefocus fires first in IE and make FF match
|
76
|
+
*
|
77
|
+
* @param {string} id An identifer for the field. This is used to find the
|
78
|
+
* field and the element associated with this field.
|
79
|
+
* @param {Document=} opt_doc The document that the element with the given
|
80
|
+
* id can be found in. If not provided, the default document is used.
|
81
|
+
* @constructor
|
82
|
+
* @extends {goog.events.EventTarget}
|
83
|
+
*/
|
84
|
+
goog.editor.Field = function(id, opt_doc) {
|
85
|
+
goog.events.EventTarget.call(this);
|
86
|
+
|
87
|
+
/**
|
88
|
+
* The id for this editable field, which must match the id of the element
|
89
|
+
* associated with this field.
|
90
|
+
* @type {string}
|
91
|
+
*/
|
92
|
+
this.id = id;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* The hash code for this field. Should be equal to the id.
|
96
|
+
* @type {string}
|
97
|
+
* @private
|
98
|
+
*/
|
99
|
+
this.hashCode_ = id;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Dom helper for the editable node.
|
103
|
+
* @type {goog.dom.DomHelper}
|
104
|
+
* @protected
|
105
|
+
*/
|
106
|
+
this.editableDomHelper = null;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Map of class id to registered plugin.
|
110
|
+
* @type {Object}
|
111
|
+
* @private
|
112
|
+
*/
|
113
|
+
this.plugins_ = {};
|
114
|
+
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Plugins registered on this field, indexed by the goog.editor.Plugin.Op
|
118
|
+
* that they support.
|
119
|
+
* @type {Object.<Array>}
|
120
|
+
* @private
|
121
|
+
*/
|
122
|
+
this.indexedPlugins_ = {};
|
123
|
+
|
124
|
+
for (var op in goog.editor.Plugin.OPCODE) {
|
125
|
+
this.indexedPlugins_[op] = [];
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Additional styles to install for the editable field.
|
131
|
+
* @type {string}
|
132
|
+
* @protected
|
133
|
+
*/
|
134
|
+
this.cssStyles = '';
|
135
|
+
|
136
|
+
// The field will not listen to change events until it has finished loading
|
137
|
+
this.stoppedEvents_ = {};
|
138
|
+
this.stopEvent(goog.editor.Field.EventType.CHANGE);
|
139
|
+
this.stopEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
|
140
|
+
this.isModified_ = false;
|
141
|
+
this.isEverModified_ = false;
|
142
|
+
this.delayedChangeTimer_ = new goog.async.Delay(this.dispatchDelayedChange_,
|
143
|
+
goog.editor.Field.DELAYED_CHANGE_FREQUENCY, this);
|
144
|
+
|
145
|
+
this.debouncedEvents_ = {};
|
146
|
+
for (var key in goog.editor.Field.EventType) {
|
147
|
+
this.debouncedEvents_[goog.editor.Field.EventType[key]] = 0;
|
148
|
+
}
|
149
|
+
|
150
|
+
if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
151
|
+
this.changeTimerGecko_ = new goog.async.Delay(this.handleChange,
|
152
|
+
goog.editor.Field.CHANGE_FREQUENCY, this);
|
153
|
+
}
|
154
|
+
|
155
|
+
/**
|
156
|
+
* @type {goog.events.EventHandler}
|
157
|
+
* @protected
|
158
|
+
*/
|
159
|
+
this.eventRegister = new goog.events.EventHandler(this);
|
160
|
+
|
161
|
+
// Wrappers around this field, to be disposed when the field is disposed.
|
162
|
+
this.wrappers_ = [];
|
163
|
+
|
164
|
+
this.loadState_ = goog.editor.Field.LoadState_.UNEDITABLE;
|
165
|
+
|
166
|
+
var doc = opt_doc || document;
|
167
|
+
|
168
|
+
/**
|
169
|
+
* @type {!goog.dom.DomHelper}
|
170
|
+
* @protected
|
171
|
+
*/
|
172
|
+
this.originalDomHelper = goog.dom.getDomHelper(doc);
|
173
|
+
|
174
|
+
/**
|
175
|
+
* @type {Element}
|
176
|
+
* @protected
|
177
|
+
*/
|
178
|
+
this.originalElement = this.originalDomHelper.getElement(this.id);
|
179
|
+
|
180
|
+
// Default to the same window as the field is in.
|
181
|
+
this.appWindow_ = this.originalDomHelper.getWindow();
|
182
|
+
};
|
183
|
+
goog.inherits(goog.editor.Field, goog.events.EventTarget);
|
184
|
+
|
185
|
+
|
186
|
+
/**
|
187
|
+
* The editable dom node.
|
188
|
+
* @type {Element}
|
189
|
+
* TODO(user): Make this private!
|
190
|
+
*/
|
191
|
+
goog.editor.Field.prototype.field = null;
|
192
|
+
|
193
|
+
|
194
|
+
/**
|
195
|
+
* The original node that is being made editable, or null if it has
|
196
|
+
* not yet been found.
|
197
|
+
* @type {Element}
|
198
|
+
* @protected
|
199
|
+
*/
|
200
|
+
goog.editor.Field.prototype.originalElement = null;
|
201
|
+
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Logging object.
|
205
|
+
* @type {goog.log.Logger}
|
206
|
+
* @protected
|
207
|
+
*/
|
208
|
+
goog.editor.Field.prototype.logger =
|
209
|
+
goog.log.getLogger('goog.editor.Field');
|
210
|
+
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Event types that can be stopped/started.
|
214
|
+
* @enum {string}
|
215
|
+
*/
|
216
|
+
goog.editor.Field.EventType = {
|
217
|
+
/**
|
218
|
+
* Dispatched when the command state of the selection may have changed. This
|
219
|
+
* event should be listened to for updating toolbar state.
|
220
|
+
*/
|
221
|
+
COMMAND_VALUE_CHANGE: 'cvc',
|
222
|
+
/**
|
223
|
+
* Dispatched when the field is loaded and ready to use.
|
224
|
+
*/
|
225
|
+
LOAD: 'load',
|
226
|
+
/**
|
227
|
+
* Dispatched when the field is fully unloaded and uneditable.
|
228
|
+
*/
|
229
|
+
UNLOAD: 'unload',
|
230
|
+
/**
|
231
|
+
* Dispatched before the field contents are changed.
|
232
|
+
*/
|
233
|
+
BEFORECHANGE: 'beforechange',
|
234
|
+
/**
|
235
|
+
* Dispatched when the field contents change, in FF only.
|
236
|
+
* Used for internal resizing, please do not use.
|
237
|
+
*/
|
238
|
+
CHANGE: 'change',
|
239
|
+
/**
|
240
|
+
* Dispatched on a slight delay after changes are made.
|
241
|
+
* Use for autosave, or other times your app needs to know
|
242
|
+
* that the field contents changed.
|
243
|
+
*/
|
244
|
+
DELAYEDCHANGE: 'delayedchange',
|
245
|
+
/**
|
246
|
+
* Dispatched before focus in moved into the field.
|
247
|
+
*/
|
248
|
+
BEFOREFOCUS: 'beforefocus',
|
249
|
+
/**
|
250
|
+
* Dispatched when focus is moved into the field.
|
251
|
+
*/
|
252
|
+
FOCUS: 'focus',
|
253
|
+
/**
|
254
|
+
* Dispatched when the field is blurred.
|
255
|
+
*/
|
256
|
+
BLUR: 'blur',
|
257
|
+
/**
|
258
|
+
* Dispatched before tab is handled by the field. This is a legacy way
|
259
|
+
* of controlling tab behavior. Use trog.plugins.AbstractTabHandler now.
|
260
|
+
*/
|
261
|
+
BEFORETAB: 'beforetab',
|
262
|
+
/**
|
263
|
+
* Dispatched after the iframe containing the field is resized, so that UI
|
264
|
+
* components which contain it can respond.
|
265
|
+
*/
|
266
|
+
IFRAME_RESIZED: 'ifrsz',
|
267
|
+
/**
|
268
|
+
* Dispatched when the selection changes.
|
269
|
+
* Use handleSelectionChange from plugin API instead of listening
|
270
|
+
* directly to this event.
|
271
|
+
*/
|
272
|
+
SELECTIONCHANGE: 'selectionchange'
|
273
|
+
};
|
274
|
+
|
275
|
+
|
276
|
+
/**
|
277
|
+
* The load state of the field.
|
278
|
+
* @enum {number}
|
279
|
+
* @private
|
280
|
+
*/
|
281
|
+
goog.editor.Field.LoadState_ = {
|
282
|
+
UNEDITABLE: 0,
|
283
|
+
LOADING: 1,
|
284
|
+
EDITABLE: 2
|
285
|
+
};
|
286
|
+
|
287
|
+
|
288
|
+
/**
|
289
|
+
* The amount of time that a debounce blocks an event.
|
290
|
+
* TODO(nicksantos): As of 9/30/07, this is only used for blocking
|
291
|
+
* a keyup event after a keydown. We might need to tweak this for other
|
292
|
+
* types of events. Maybe have a per-event debounce time?
|
293
|
+
* @type {number}
|
294
|
+
* @private
|
295
|
+
*/
|
296
|
+
goog.editor.Field.DEBOUNCE_TIME_MS_ = 500;
|
297
|
+
|
298
|
+
|
299
|
+
/**
|
300
|
+
* There is at most one "active" field at a time. By "active" field, we mean
|
301
|
+
* a field that has focus and is being used.
|
302
|
+
* @type {?string}
|
303
|
+
* @private
|
304
|
+
*/
|
305
|
+
goog.editor.Field.activeFieldId_ = null;
|
306
|
+
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Whether this field is in "modal interaction" mode. This usually
|
310
|
+
* means that it's being edited by a dialog.
|
311
|
+
* @type {boolean}
|
312
|
+
* @private
|
313
|
+
*/
|
314
|
+
goog.editor.Field.prototype.inModalMode_ = false;
|
315
|
+
|
316
|
+
|
317
|
+
/**
|
318
|
+
* The window where dialogs and bubbles should be rendered.
|
319
|
+
* @type {!Window}
|
320
|
+
* @private
|
321
|
+
*/
|
322
|
+
goog.editor.Field.prototype.appWindow_;
|
323
|
+
|
324
|
+
|
325
|
+
/**
|
326
|
+
* The dom helper for the node to be made editable.
|
327
|
+
* @type {goog.dom.DomHelper}
|
328
|
+
* @protected
|
329
|
+
*/
|
330
|
+
goog.editor.Field.prototype.originalDomHelper;
|
331
|
+
|
332
|
+
|
333
|
+
/**
|
334
|
+
* Target node to be used when dispatching SELECTIONCHANGE asynchronously on
|
335
|
+
* mouseup (to avoid IE quirk). Should be set just before starting the timer and
|
336
|
+
* nulled right after consuming.
|
337
|
+
* @type {Node}
|
338
|
+
* @private
|
339
|
+
*/
|
340
|
+
goog.editor.Field.prototype.selectionChangeTarget_;
|
341
|
+
|
342
|
+
|
343
|
+
/**
|
344
|
+
* Flag controlling wether to capture mouse up events on the window or not.
|
345
|
+
* @type {boolean}
|
346
|
+
* @private
|
347
|
+
*/
|
348
|
+
goog.editor.Field.prototype.useWindowMouseUp_ = false;
|
349
|
+
|
350
|
+
|
351
|
+
/**
|
352
|
+
* FLag indicating the handling of a mouse event sequence.
|
353
|
+
* @type {boolean}
|
354
|
+
* @private
|
355
|
+
*/
|
356
|
+
goog.editor.Field.prototype.waitingForMouseUp_ = false;
|
357
|
+
|
358
|
+
|
359
|
+
/**
|
360
|
+
* Sets the active field id.
|
361
|
+
* @param {?string} fieldId The active field id.
|
362
|
+
*/
|
363
|
+
goog.editor.Field.setActiveFieldId = function(fieldId) {
|
364
|
+
goog.editor.Field.activeFieldId_ = fieldId;
|
365
|
+
};
|
366
|
+
|
367
|
+
|
368
|
+
/**
|
369
|
+
* @return {?string} The id of the active field.
|
370
|
+
*/
|
371
|
+
goog.editor.Field.getActiveFieldId = function() {
|
372
|
+
return goog.editor.Field.activeFieldId_;
|
373
|
+
};
|
374
|
+
|
375
|
+
|
376
|
+
/**
|
377
|
+
* Sets flag to control whether to use window mouse up after seeing
|
378
|
+
* a mouse down operation on the field.
|
379
|
+
* @param {boolean} flag True to track window mouse up.
|
380
|
+
*/
|
381
|
+
goog.editor.Field.prototype.setUseWindowMouseUp = function(flag) {
|
382
|
+
goog.asserts.assert(!flag || !this.usesIframe(),
|
383
|
+
'procssing window mouse up should only be enabled when not using iframe');
|
384
|
+
this.useWindowMouseUp_ = flag;
|
385
|
+
};
|
386
|
+
|
387
|
+
|
388
|
+
/**
|
389
|
+
* @return {boolean} Whether we're in modal interaction mode. When this
|
390
|
+
* returns true, another plugin is interacting with the field contents
|
391
|
+
* in a synchronous way, and expects you not to make changes to
|
392
|
+
* the field's DOM structure or selection.
|
393
|
+
*/
|
394
|
+
goog.editor.Field.prototype.inModalMode = function() {
|
395
|
+
return this.inModalMode_;
|
396
|
+
};
|
397
|
+
|
398
|
+
|
399
|
+
/**
|
400
|
+
* @param {boolean} inModalMode Sets whether we're in modal interaction mode.
|
401
|
+
*/
|
402
|
+
goog.editor.Field.prototype.setModalMode = function(inModalMode) {
|
403
|
+
this.inModalMode_ = inModalMode;
|
404
|
+
};
|
405
|
+
|
406
|
+
|
407
|
+
/**
|
408
|
+
* Returns a string usable as a hash code for this field. For field's
|
409
|
+
* that were created with an id, the hash code is guaranteed to be the id.
|
410
|
+
* TODO(user): I think we can get rid of this. Seems only used from editor.
|
411
|
+
* @return {string} The hash code for this editable field.
|
412
|
+
*/
|
413
|
+
goog.editor.Field.prototype.getHashCode = function() {
|
414
|
+
return this.hashCode_;
|
415
|
+
};
|
416
|
+
|
417
|
+
|
418
|
+
/**
|
419
|
+
* Returns the editable DOM element or null if this field
|
420
|
+
* is not editable.
|
421
|
+
* <p>On IE or Safari this is the element with contentEditable=true
|
422
|
+
* (in whitebox mode, the iFrame body).
|
423
|
+
* <p>On Gecko this is the iFrame body
|
424
|
+
* TODO(user): How do we word this for subclass version?
|
425
|
+
* @return {Element} The editable DOM element, defined as above.
|
426
|
+
*/
|
427
|
+
goog.editor.Field.prototype.getElement = function() {
|
428
|
+
return this.field;
|
429
|
+
};
|
430
|
+
|
431
|
+
|
432
|
+
/**
|
433
|
+
* Returns original DOM element that is being made editable by Trogedit or
|
434
|
+
* null if that element has not yet been found in the appropriate document.
|
435
|
+
* @return {Element} The original element.
|
436
|
+
*/
|
437
|
+
goog.editor.Field.prototype.getOriginalElement = function() {
|
438
|
+
return this.originalElement;
|
439
|
+
};
|
440
|
+
|
441
|
+
|
442
|
+
/**
|
443
|
+
* Registers a keyboard event listener on the field. This is necessary for
|
444
|
+
* Gecko since the fields are contained in an iFrame and there is no way to
|
445
|
+
* auto-propagate key events up to the main window.
|
446
|
+
* @param {string|Array.<string>} type Event type to listen for or array of
|
447
|
+
* event types, for example goog.events.EventType.KEYDOWN.
|
448
|
+
* @param {Function} listener Function to be used as the listener.
|
449
|
+
* @param {boolean=} opt_capture Whether to use capture phase (optional,
|
450
|
+
* defaults to false).
|
451
|
+
* @param {Object=} opt_handler Object in whose scope to call the listener.
|
452
|
+
*/
|
453
|
+
goog.editor.Field.prototype.addListener = function(type, listener, opt_capture,
|
454
|
+
opt_handler) {
|
455
|
+
var elem = this.getElement();
|
456
|
+
// On Gecko, keyboard events only reliably fire on the document element when
|
457
|
+
// using an iframe.
|
458
|
+
if (goog.editor.BrowserFeature.USE_DOCUMENT_FOR_KEY_EVENTS && elem &&
|
459
|
+
this.usesIframe()) {
|
460
|
+
elem = elem.ownerDocument;
|
461
|
+
}
|
462
|
+
this.eventRegister.listen(elem, type, listener, opt_capture, opt_handler);
|
463
|
+
};
|
464
|
+
|
465
|
+
|
466
|
+
/**
|
467
|
+
* Returns the registered plugin with the given classId.
|
468
|
+
* @param {string} classId classId of the plugin.
|
469
|
+
* @return {goog.editor.Plugin} Registered plugin with the given classId.
|
470
|
+
*/
|
471
|
+
goog.editor.Field.prototype.getPluginByClassId = function(classId) {
|
472
|
+
return this.plugins_[classId];
|
473
|
+
};
|
474
|
+
|
475
|
+
|
476
|
+
/**
|
477
|
+
* Registers the plugin with the editable field.
|
478
|
+
* @param {goog.editor.Plugin} plugin The plugin to register.
|
479
|
+
*/
|
480
|
+
goog.editor.Field.prototype.registerPlugin = function(plugin) {
|
481
|
+
var classId = plugin.getTrogClassId();
|
482
|
+
if (this.plugins_[classId]) {
|
483
|
+
goog.log.error(this.logger,
|
484
|
+
'Cannot register the same class of plugin twice.');
|
485
|
+
}
|
486
|
+
this.plugins_[classId] = plugin;
|
487
|
+
|
488
|
+
// Only key events and execute should have these has* functions with a custom
|
489
|
+
// handler array since they need to be very careful about performance.
|
490
|
+
// The rest of the plugin hooks should be event-based.
|
491
|
+
for (var op in goog.editor.Plugin.OPCODE) {
|
492
|
+
var opcode = goog.editor.Plugin.OPCODE[op];
|
493
|
+
if (plugin[opcode]) {
|
494
|
+
this.indexedPlugins_[op].push(plugin);
|
495
|
+
}
|
496
|
+
}
|
497
|
+
plugin.registerFieldObject(this);
|
498
|
+
|
499
|
+
// By default we enable all plugins for fields that are currently loaded.
|
500
|
+
if (this.isLoaded()) {
|
501
|
+
plugin.enable(this);
|
502
|
+
}
|
503
|
+
};
|
504
|
+
|
505
|
+
|
506
|
+
/**
|
507
|
+
* Unregisters the plugin with this field.
|
508
|
+
* @param {goog.editor.Plugin} plugin The plugin to unregister.
|
509
|
+
*/
|
510
|
+
goog.editor.Field.prototype.unregisterPlugin = function(plugin) {
|
511
|
+
var classId = plugin.getTrogClassId();
|
512
|
+
if (!this.plugins_[classId]) {
|
513
|
+
goog.log.error(this.logger,
|
514
|
+
'Cannot unregister a plugin that isn\'t registered.');
|
515
|
+
}
|
516
|
+
delete this.plugins_[classId];
|
517
|
+
|
518
|
+
for (var op in goog.editor.Plugin.OPCODE) {
|
519
|
+
var opcode = goog.editor.Plugin.OPCODE[op];
|
520
|
+
if (plugin[opcode]) {
|
521
|
+
goog.array.remove(this.indexedPlugins_[op], plugin);
|
522
|
+
}
|
523
|
+
}
|
524
|
+
|
525
|
+
plugin.unregisterFieldObject(this);
|
526
|
+
};
|
527
|
+
|
528
|
+
|
529
|
+
/**
|
530
|
+
* Sets the value that will replace the style attribute of this field's
|
531
|
+
* element when the field is made non-editable. This method is called with the
|
532
|
+
* current value of the style attribute when the field is made editable.
|
533
|
+
* @param {string} cssText The value of the style attribute.
|
534
|
+
*/
|
535
|
+
goog.editor.Field.prototype.setInitialStyle = function(cssText) {
|
536
|
+
this.cssText = cssText;
|
537
|
+
};
|
538
|
+
|
539
|
+
|
540
|
+
/**
|
541
|
+
* Reset the properties on the original field element to how it was before
|
542
|
+
* it was made editable.
|
543
|
+
*/
|
544
|
+
goog.editor.Field.prototype.resetOriginalElemProperties = function() {
|
545
|
+
var field = this.getOriginalElement();
|
546
|
+
field.removeAttribute('contentEditable');
|
547
|
+
field.removeAttribute('g_editable');
|
548
|
+
field.removeAttribute('role');
|
549
|
+
|
550
|
+
if (!this.id) {
|
551
|
+
field.removeAttribute('id');
|
552
|
+
} else {
|
553
|
+
field.id = this.id;
|
554
|
+
}
|
555
|
+
|
556
|
+
field.className = this.savedClassName_ || '';
|
557
|
+
|
558
|
+
var cssText = this.cssText;
|
559
|
+
if (!cssText) {
|
560
|
+
field.removeAttribute('style');
|
561
|
+
} else {
|
562
|
+
goog.dom.setProperties(field, {'style' : cssText});
|
563
|
+
}
|
564
|
+
|
565
|
+
if (goog.isString(this.originalFieldLineHeight_)) {
|
566
|
+
goog.style.setStyle(field, 'lineHeight', this.originalFieldLineHeight_);
|
567
|
+
this.originalFieldLineHeight_ = null;
|
568
|
+
}
|
569
|
+
};
|
570
|
+
|
571
|
+
|
572
|
+
/**
|
573
|
+
* Checks the modified state of the field.
|
574
|
+
* Note: Changes that take place while the goog.editor.Field.EventType.CHANGE
|
575
|
+
* event is stopped do not effect the modified state.
|
576
|
+
* @param {boolean=} opt_useIsEverModified Set to true to check if the field
|
577
|
+
* has ever been modified since it was created, otherwise checks if the field
|
578
|
+
* has been modified since the last goog.editor.Field.EventType.DELAYEDCHANGE
|
579
|
+
* event was dispatched.
|
580
|
+
* @return {boolean} Whether the field has been modified.
|
581
|
+
*/
|
582
|
+
goog.editor.Field.prototype.isModified = function(opt_useIsEverModified) {
|
583
|
+
return opt_useIsEverModified ? this.isEverModified_ : this.isModified_;
|
584
|
+
};
|
585
|
+
|
586
|
+
|
587
|
+
/**
|
588
|
+
* Number of milliseconds after a change when the change event should be fired.
|
589
|
+
* @type {number}
|
590
|
+
*/
|
591
|
+
goog.editor.Field.CHANGE_FREQUENCY = 15;
|
592
|
+
|
593
|
+
|
594
|
+
/**
|
595
|
+
* Number of milliseconds between delayed change events.
|
596
|
+
* @type {number}
|
597
|
+
*/
|
598
|
+
goog.editor.Field.DELAYED_CHANGE_FREQUENCY = 250;
|
599
|
+
|
600
|
+
|
601
|
+
/**
|
602
|
+
* @return {boolean} Whether the field is implemented as an iframe.
|
603
|
+
*/
|
604
|
+
goog.editor.Field.prototype.usesIframe = goog.functions.TRUE;
|
605
|
+
|
606
|
+
|
607
|
+
/**
|
608
|
+
* @return {boolean} Whether the field should be rendered with a fixed
|
609
|
+
* height, or should expand to fit its contents.
|
610
|
+
*/
|
611
|
+
goog.editor.Field.prototype.isFixedHeight = goog.functions.TRUE;
|
612
|
+
|
613
|
+
|
614
|
+
/**
|
615
|
+
* @return {boolean} Whether the field should be refocused on input.
|
616
|
+
* This is a workaround for the iOS bug that text input doesn't work
|
617
|
+
* when the main window listens touch events.
|
618
|
+
*/
|
619
|
+
goog.editor.Field.prototype.shouldRefocusOnInputMobileSafari =
|
620
|
+
goog.functions.FALSE;
|
621
|
+
|
622
|
+
|
623
|
+
/**
|
624
|
+
* Map of keyCodes (not charCodes) that cause changes in the field contents.
|
625
|
+
* @type {Object}
|
626
|
+
* @private
|
627
|
+
*/
|
628
|
+
goog.editor.Field.KEYS_CAUSING_CHANGES_ = {
|
629
|
+
46: true, // DEL
|
630
|
+
8: true // BACKSPACE
|
631
|
+
};
|
632
|
+
|
633
|
+
if (!goog.userAgent.IE) {
|
634
|
+
// Only IE doesn't change the field by default upon tab.
|
635
|
+
// TODO(user): This really isn't right now that we have tab plugins.
|
636
|
+
goog.editor.Field.KEYS_CAUSING_CHANGES_[9] = true; // TAB
|
637
|
+
}
|
638
|
+
|
639
|
+
|
640
|
+
/**
|
641
|
+
* Map of keyCodes (not charCodes) that when used in conjunction with the
|
642
|
+
* Ctrl key cause changes in the field contents. These are the keys that are
|
643
|
+
* not handled by basic formatting trogedit plugins.
|
644
|
+
* @type {Object}
|
645
|
+
* @private
|
646
|
+
*/
|
647
|
+
goog.editor.Field.CTRL_KEYS_CAUSING_CHANGES_ = {
|
648
|
+
86: true, // V
|
649
|
+
88: true // X
|
650
|
+
};
|
651
|
+
|
652
|
+
if (goog.userAgent.WINDOWS && !goog.userAgent.GECKO) {
|
653
|
+
// In IE and Webkit, input from IME (Input Method Editor) does not generate a
|
654
|
+
// keypress event so we have to rely on the keydown event. This way we have
|
655
|
+
// false positives while the user is using keyboard to select the
|
656
|
+
// character to input, but it is still better than the false negatives
|
657
|
+
// that ignores user's final input at all.
|
658
|
+
goog.editor.Field.KEYS_CAUSING_CHANGES_[229] = true; // from IME;
|
659
|
+
}
|
660
|
+
|
661
|
+
|
662
|
+
/**
|
663
|
+
* Returns true if the keypress generates a change in contents.
|
664
|
+
* @param {goog.events.BrowserEvent} e The event.
|
665
|
+
* @param {boolean} testAllKeys True to test for all types of generating keys.
|
666
|
+
* False to test for only the keys found in
|
667
|
+
* goog.editor.Field.KEYS_CAUSING_CHANGES_.
|
668
|
+
* @return {boolean} Whether the keypress generates a change in contents.
|
669
|
+
* @private
|
670
|
+
*/
|
671
|
+
goog.editor.Field.isGeneratingKey_ = function(e, testAllKeys) {
|
672
|
+
if (goog.editor.Field.isSpecialGeneratingKey_(e)) {
|
673
|
+
return true;
|
674
|
+
}
|
675
|
+
|
676
|
+
return !!(testAllKeys && !(e.ctrlKey || e.metaKey) &&
|
677
|
+
(!goog.userAgent.GECKO || e.charCode));
|
678
|
+
};
|
679
|
+
|
680
|
+
|
681
|
+
/**
|
682
|
+
* Returns true if the keypress generates a change in the contents.
|
683
|
+
* due to a special key listed in goog.editor.Field.KEYS_CAUSING_CHANGES_
|
684
|
+
* @param {goog.events.BrowserEvent} e The event.
|
685
|
+
* @return {boolean} Whether the keypress generated a change in the contents.
|
686
|
+
* @private
|
687
|
+
*/
|
688
|
+
goog.editor.Field.isSpecialGeneratingKey_ = function(e) {
|
689
|
+
var testCtrlKeys = (e.ctrlKey || e.metaKey) &&
|
690
|
+
e.keyCode in goog.editor.Field.CTRL_KEYS_CAUSING_CHANGES_;
|
691
|
+
var testRegularKeys = !(e.ctrlKey || e.metaKey) &&
|
692
|
+
e.keyCode in goog.editor.Field.KEYS_CAUSING_CHANGES_;
|
693
|
+
|
694
|
+
return testCtrlKeys || testRegularKeys;
|
695
|
+
};
|
696
|
+
|
697
|
+
|
698
|
+
/**
|
699
|
+
* Sets the application window.
|
700
|
+
* @param {!Window} appWindow The window where dialogs and bubbles should be
|
701
|
+
* rendered.
|
702
|
+
*/
|
703
|
+
goog.editor.Field.prototype.setAppWindow = function(appWindow) {
|
704
|
+
this.appWindow_ = appWindow;
|
705
|
+
};
|
706
|
+
|
707
|
+
|
708
|
+
/**
|
709
|
+
* Returns the "application" window, where dialogs and bubbles
|
710
|
+
* should be rendered.
|
711
|
+
* @return {!Window} The window.
|
712
|
+
*/
|
713
|
+
goog.editor.Field.prototype.getAppWindow = function() {
|
714
|
+
return this.appWindow_;
|
715
|
+
};
|
716
|
+
|
717
|
+
|
718
|
+
/**
|
719
|
+
* Sets the zIndex that the field should be based off of.
|
720
|
+
* TODO(user): Get rid of this completely. Here for Sites.
|
721
|
+
* Should this be set directly on UI plugins?
|
722
|
+
*
|
723
|
+
* @param {number} zindex The base zIndex of the editor.
|
724
|
+
*/
|
725
|
+
goog.editor.Field.prototype.setBaseZindex = function(zindex) {
|
726
|
+
this.baseZindex_ = zindex;
|
727
|
+
};
|
728
|
+
|
729
|
+
|
730
|
+
/**
|
731
|
+
* Returns the zindex of the base level of the field.
|
732
|
+
*
|
733
|
+
* @return {number} The base zindex of the editor.
|
734
|
+
*/
|
735
|
+
goog.editor.Field.prototype.getBaseZindex = function() {
|
736
|
+
return this.baseZindex_ || 0;
|
737
|
+
};
|
738
|
+
|
739
|
+
|
740
|
+
/**
|
741
|
+
* Sets up the field object and window util of this field, and enables this
|
742
|
+
* editable field with all registered plugins.
|
743
|
+
* This is essential to the initialization of the field.
|
744
|
+
* It must be called when the field becomes fully loaded and editable.
|
745
|
+
* @param {Element} field The field property.
|
746
|
+
* @protected
|
747
|
+
*/
|
748
|
+
goog.editor.Field.prototype.setupFieldObject = function(field) {
|
749
|
+
this.loadState_ = goog.editor.Field.LoadState_.EDITABLE;
|
750
|
+
this.field = field;
|
751
|
+
this.editableDomHelper = goog.dom.getDomHelper(field);
|
752
|
+
this.isModified_ = false;
|
753
|
+
this.isEverModified_ = false;
|
754
|
+
field.setAttribute('g_editable', 'true');
|
755
|
+
goog.a11y.aria.setRole(field, goog.a11y.aria.Role.TEXTBOX);
|
756
|
+
};
|
757
|
+
|
758
|
+
|
759
|
+
/**
|
760
|
+
* Help make the field not editable by setting internal data structures to null,
|
761
|
+
* and disabling this field with all registered plugins.
|
762
|
+
* @private
|
763
|
+
*/
|
764
|
+
goog.editor.Field.prototype.tearDownFieldObject_ = function() {
|
765
|
+
this.loadState_ = goog.editor.Field.LoadState_.UNEDITABLE;
|
766
|
+
|
767
|
+
for (var classId in this.plugins_) {
|
768
|
+
var plugin = this.plugins_[classId];
|
769
|
+
if (!plugin.activeOnUneditableFields()) {
|
770
|
+
plugin.disable(this);
|
771
|
+
}
|
772
|
+
}
|
773
|
+
|
774
|
+
this.field = null;
|
775
|
+
this.editableDomHelper = null;
|
776
|
+
};
|
777
|
+
|
778
|
+
|
779
|
+
/**
|
780
|
+
* Initialize listeners on the field.
|
781
|
+
* @private
|
782
|
+
*/
|
783
|
+
goog.editor.Field.prototype.setupChangeListeners_ = function() {
|
784
|
+
if ((goog.userAgent.product.IPHONE || goog.userAgent.product.IPAD) &&
|
785
|
+
this.usesIframe() && this.shouldRefocusOnInputMobileSafari()) {
|
786
|
+
// This is a workaround for the iOS bug that text input doesn't work
|
787
|
+
// when the main window listens touch events.
|
788
|
+
var editWindow = this.getEditableDomHelper().getWindow();
|
789
|
+
this.boundRefocusListenerMobileSafari_ =
|
790
|
+
goog.bind(editWindow.focus, editWindow);
|
791
|
+
editWindow.addEventListener(goog.events.EventType.KEYDOWN,
|
792
|
+
this.boundRefocusListenerMobileSafari_, false);
|
793
|
+
editWindow.addEventListener(goog.events.EventType.TOUCHEND,
|
794
|
+
this.boundRefocusListenerMobileSafari_, false);
|
795
|
+
}
|
796
|
+
if (goog.userAgent.OPERA && this.usesIframe()) {
|
797
|
+
// We can't use addListener here because we need to listen on the window,
|
798
|
+
// and removing listeners on window objects from the event register throws
|
799
|
+
// an exception if the window is closed.
|
800
|
+
this.boundFocusListenerOpera_ =
|
801
|
+
goog.bind(this.dispatchFocusAndBeforeFocus_, this);
|
802
|
+
this.boundBlurListenerOpera_ =
|
803
|
+
goog.bind(this.dispatchBlur, this);
|
804
|
+
var editWindow = this.getEditableDomHelper().getWindow();
|
805
|
+
editWindow.addEventListener(goog.events.EventType.FOCUS,
|
806
|
+
this.boundFocusListenerOpera_, false);
|
807
|
+
editWindow.addEventListener(goog.events.EventType.BLUR,
|
808
|
+
this.boundBlurListenerOpera_, false);
|
809
|
+
} else {
|
810
|
+
if (goog.editor.BrowserFeature.SUPPORTS_FOCUSIN) {
|
811
|
+
this.addListener(goog.events.EventType.FOCUS, this.dispatchFocus_);
|
812
|
+
this.addListener(goog.events.EventType.FOCUSIN,
|
813
|
+
this.dispatchBeforeFocus_);
|
814
|
+
} else {
|
815
|
+
this.addListener(goog.events.EventType.FOCUS,
|
816
|
+
this.dispatchFocusAndBeforeFocus_);
|
817
|
+
}
|
818
|
+
this.addListener(goog.events.EventType.BLUR, this.dispatchBlur,
|
819
|
+
goog.editor.BrowserFeature.USE_MUTATION_EVENTS);
|
820
|
+
}
|
821
|
+
|
822
|
+
if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
823
|
+
// Ways to detect changes in Mozilla:
|
824
|
+
//
|
825
|
+
// keypress - check event.charCode (only typable characters has a
|
826
|
+
// charCode), but also keyboard commands lile Ctrl+C will
|
827
|
+
// return a charCode.
|
828
|
+
// dragdrop - fires when the user drops something. This does not necessary
|
829
|
+
// lead to a change but we cannot detect if it will or not
|
830
|
+
//
|
831
|
+
// Known Issues: We cannot detect cut and paste using menus
|
832
|
+
// We cannot detect when someone moves something out of the
|
833
|
+
// field using drag and drop.
|
834
|
+
//
|
835
|
+
this.setupMutationEventHandlersGecko();
|
836
|
+
} else {
|
837
|
+
// Ways to detect that a change is about to happen in other browsers.
|
838
|
+
// (IE and Safari have these events. Opera appears to work, but we haven't
|
839
|
+
// researched it.)
|
840
|
+
//
|
841
|
+
// onbeforepaste
|
842
|
+
// onbeforecut
|
843
|
+
// ondrop - happens when the user drops something on the editable text
|
844
|
+
// field the value at this time does not contain the dropped text
|
845
|
+
// ondragleave - when the user drags something from the current document.
|
846
|
+
// This might not cause a change if the action was copy
|
847
|
+
// instead of move
|
848
|
+
// onkeypress - IE only fires keypress events if the key will generate
|
849
|
+
// output. It will not trigger for delete and backspace
|
850
|
+
// onkeydown - For delete and backspace
|
851
|
+
//
|
852
|
+
// known issues: IE triggers beforepaste just by opening the edit menu
|
853
|
+
// delete at the end should not cause beforechange
|
854
|
+
// backspace at the beginning should not cause beforechange
|
855
|
+
// see above in ondragleave
|
856
|
+
// TODO(user): Why don't we dispatchBeforeChange from the
|
857
|
+
// handleDrop event for all browsers?
|
858
|
+
this.addListener(['beforecut', 'beforepaste', 'drop', 'dragend'],
|
859
|
+
this.dispatchBeforeChange);
|
860
|
+
this.addListener(['cut', 'paste'],
|
861
|
+
goog.functions.lock(this.dispatchChange));
|
862
|
+
this.addListener('drop', this.handleDrop_);
|
863
|
+
}
|
864
|
+
|
865
|
+
// TODO(user): Figure out why we use dragend vs dragdrop and
|
866
|
+
// document this better.
|
867
|
+
var dropEventName = goog.userAgent.WEBKIT ? 'dragend' : 'dragdrop';
|
868
|
+
this.addListener(dropEventName, this.handleDrop_);
|
869
|
+
|
870
|
+
this.addListener(goog.events.EventType.KEYDOWN, this.handleKeyDown_);
|
871
|
+
this.addListener(goog.events.EventType.KEYPRESS, this.handleKeyPress_);
|
872
|
+
this.addListener(goog.events.EventType.KEYUP, this.handleKeyUp_);
|
873
|
+
|
874
|
+
this.selectionChangeTimer_ =
|
875
|
+
new goog.async.Delay(this.handleSelectionChangeTimer_,
|
876
|
+
goog.editor.Field.SELECTION_CHANGE_FREQUENCY_, this);
|
877
|
+
|
878
|
+
if (goog.editor.BrowserFeature.FOLLOWS_EDITABLE_LINKS) {
|
879
|
+
this.addListener(
|
880
|
+
goog.events.EventType.CLICK, goog.editor.Field.cancelLinkClick_);
|
881
|
+
}
|
882
|
+
|
883
|
+
this.addListener(goog.events.EventType.MOUSEDOWN, this.handleMouseDown_);
|
884
|
+
if (this.useWindowMouseUp_) {
|
885
|
+
this.eventRegister.listen(this.editableDomHelper.getDocument(),
|
886
|
+
goog.events.EventType.MOUSEUP, this.handleMouseUp_);
|
887
|
+
this.addListener(goog.events.EventType.DRAGSTART, this.handleDragStart_);
|
888
|
+
} else {
|
889
|
+
this.addListener(goog.events.EventType.MOUSEUP, this.handleMouseUp_);
|
890
|
+
}
|
891
|
+
};
|
892
|
+
|
893
|
+
|
894
|
+
/**
|
895
|
+
* Frequency to check for selection changes.
|
896
|
+
* @type {number}
|
897
|
+
* @private
|
898
|
+
*/
|
899
|
+
goog.editor.Field.SELECTION_CHANGE_FREQUENCY_ = 250;
|
900
|
+
|
901
|
+
|
902
|
+
/**
|
903
|
+
* Stops all listeners and timers.
|
904
|
+
* @protected
|
905
|
+
*/
|
906
|
+
goog.editor.Field.prototype.clearListeners = function() {
|
907
|
+
if (this.eventRegister) {
|
908
|
+
this.eventRegister.removeAll();
|
909
|
+
}
|
910
|
+
|
911
|
+
if ((goog.userAgent.product.IPHONE || goog.userAgent.product.IPAD) &&
|
912
|
+
this.usesIframe() && this.shouldRefocusOnInputMobileSafari()) {
|
913
|
+
try {
|
914
|
+
var editWindow = this.getEditableDomHelper().getWindow();
|
915
|
+
editWindow.removeEventListener(goog.events.EventType.KEYDOWN,
|
916
|
+
this.boundRefocusListenerMobileSafari_, false);
|
917
|
+
editWindow.removeEventListener(goog.events.EventType.TOUCHEND,
|
918
|
+
this.boundRefocusListenerMobileSafari_, false);
|
919
|
+
} catch (e) {
|
920
|
+
// The editWindow no longer exists, or has been navigated to a different-
|
921
|
+
// origin URL. Either way, the event listeners have already been removed
|
922
|
+
// for us.
|
923
|
+
}
|
924
|
+
delete this.boundRefocusListenerMobileSafari_;
|
925
|
+
}
|
926
|
+
if (goog.userAgent.OPERA && this.usesIframe()) {
|
927
|
+
try {
|
928
|
+
var editWindow = this.getEditableDomHelper().getWindow();
|
929
|
+
editWindow.removeEventListener(goog.events.EventType.FOCUS,
|
930
|
+
this.boundFocusListenerOpera_, false);
|
931
|
+
editWindow.removeEventListener(goog.events.EventType.BLUR,
|
932
|
+
this.boundBlurListenerOpera_, false);
|
933
|
+
} catch (e) {
|
934
|
+
// The editWindow no longer exists, or has been navigated to a different-
|
935
|
+
// origin URL. Either way, the event listeners have already been removed
|
936
|
+
// for us.
|
937
|
+
}
|
938
|
+
delete this.boundFocusListenerOpera_;
|
939
|
+
delete this.boundBlurListenerOpera_;
|
940
|
+
}
|
941
|
+
|
942
|
+
if (this.changeTimerGecko_) {
|
943
|
+
this.changeTimerGecko_.stop();
|
944
|
+
}
|
945
|
+
this.delayedChangeTimer_.stop();
|
946
|
+
};
|
947
|
+
|
948
|
+
|
949
|
+
/** @override */
|
950
|
+
goog.editor.Field.prototype.disposeInternal = function() {
|
951
|
+
if (this.isLoading() || this.isLoaded()) {
|
952
|
+
goog.log.warning(this.logger, 'Disposing a field that is in use.');
|
953
|
+
}
|
954
|
+
|
955
|
+
if (this.getOriginalElement()) {
|
956
|
+
this.execCommand(goog.editor.Command.CLEAR_LOREM);
|
957
|
+
}
|
958
|
+
|
959
|
+
this.tearDownFieldObject_();
|
960
|
+
this.clearListeners();
|
961
|
+
this.clearFieldLoadListener_();
|
962
|
+
this.originalDomHelper = null;
|
963
|
+
|
964
|
+
if (this.eventRegister) {
|
965
|
+
this.eventRegister.dispose();
|
966
|
+
this.eventRegister = null;
|
967
|
+
}
|
968
|
+
|
969
|
+
this.removeAllWrappers();
|
970
|
+
|
971
|
+
if (goog.editor.Field.getActiveFieldId() == this.id) {
|
972
|
+
goog.editor.Field.setActiveFieldId(null);
|
973
|
+
}
|
974
|
+
|
975
|
+
for (var classId in this.plugins_) {
|
976
|
+
var plugin = this.plugins_[classId];
|
977
|
+
if (plugin.isAutoDispose()) {
|
978
|
+
plugin.dispose();
|
979
|
+
}
|
980
|
+
}
|
981
|
+
delete(this.plugins_);
|
982
|
+
|
983
|
+
goog.editor.Field.superClass_.disposeInternal.call(this);
|
984
|
+
};
|
985
|
+
|
986
|
+
|
987
|
+
/**
|
988
|
+
* Attach an wrapper to this field, to be thrown out when the field
|
989
|
+
* is disposed.
|
990
|
+
* @param {goog.Disposable} wrapper The wrapper to attach.
|
991
|
+
*/
|
992
|
+
goog.editor.Field.prototype.attachWrapper = function(wrapper) {
|
993
|
+
this.wrappers_.push(wrapper);
|
994
|
+
};
|
995
|
+
|
996
|
+
|
997
|
+
/**
|
998
|
+
* Removes all wrappers and destroys them.
|
999
|
+
*/
|
1000
|
+
goog.editor.Field.prototype.removeAllWrappers = function() {
|
1001
|
+
var wrapper;
|
1002
|
+
while (wrapper = this.wrappers_.pop()) {
|
1003
|
+
wrapper.dispose();
|
1004
|
+
}
|
1005
|
+
};
|
1006
|
+
|
1007
|
+
|
1008
|
+
/**
|
1009
|
+
* List of mutation events in Gecko browsers.
|
1010
|
+
* @type {Array.<string>}
|
1011
|
+
* @protected
|
1012
|
+
*/
|
1013
|
+
goog.editor.Field.MUTATION_EVENTS_GECKO = [
|
1014
|
+
'DOMNodeInserted',
|
1015
|
+
'DOMNodeRemoved',
|
1016
|
+
'DOMNodeRemovedFromDocument',
|
1017
|
+
'DOMNodeInsertedIntoDocument',
|
1018
|
+
'DOMCharacterDataModified'
|
1019
|
+
];
|
1020
|
+
|
1021
|
+
|
1022
|
+
/**
|
1023
|
+
* Mutation events tell us when something has changed for mozilla.
|
1024
|
+
* @protected
|
1025
|
+
*/
|
1026
|
+
goog.editor.Field.prototype.setupMutationEventHandlersGecko = function() {
|
1027
|
+
// Always use DOMSubtreeModified on Gecko when not using an iframe so that
|
1028
|
+
// DOM mutations outside the Field do not trigger handleMutationEventGecko_.
|
1029
|
+
if (goog.editor.BrowserFeature.HAS_DOM_SUBTREE_MODIFIED_EVENT ||
|
1030
|
+
!this.usesIframe()) {
|
1031
|
+
this.eventRegister.listen(this.getElement(), 'DOMSubtreeModified',
|
1032
|
+
this.handleMutationEventGecko_);
|
1033
|
+
} else {
|
1034
|
+
var doc = this.getEditableDomHelper().getDocument();
|
1035
|
+
this.eventRegister.listen(doc, goog.editor.Field.MUTATION_EVENTS_GECKO,
|
1036
|
+
this.handleMutationEventGecko_, true);
|
1037
|
+
|
1038
|
+
// DOMAttrModified fires for a lot of events we want to ignore. This goes
|
1039
|
+
// through a different handler so that we can ignore many of these.
|
1040
|
+
this.eventRegister.listen(doc, 'DOMAttrModified',
|
1041
|
+
goog.bind(this.handleDomAttrChange, this,
|
1042
|
+
this.handleMutationEventGecko_),
|
1043
|
+
true);
|
1044
|
+
}
|
1045
|
+
};
|
1046
|
+
|
1047
|
+
|
1048
|
+
/**
|
1049
|
+
* Handle before change key events and fire the beforetab event if appropriate.
|
1050
|
+
* This needs to happen on keydown in IE and keypress in FF.
|
1051
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1052
|
+
* @return {boolean} Whether to still perform the default key action. Only set
|
1053
|
+
* to true if the actual event has already been canceled.
|
1054
|
+
* @private
|
1055
|
+
*/
|
1056
|
+
goog.editor.Field.prototype.handleBeforeChangeKeyEvent_ = function(e) {
|
1057
|
+
// There are two reasons to block a key:
|
1058
|
+
var block =
|
1059
|
+
// #1: to intercept a tab
|
1060
|
+
// TODO: possibly don't allow clients to intercept tabs outside of LIs and
|
1061
|
+
// maybe tables as well?
|
1062
|
+
(e.keyCode == goog.events.KeyCodes.TAB && !this.dispatchBeforeTab_(e)) ||
|
1063
|
+
// #2: to block a Firefox-specific bug where Macs try to navigate
|
1064
|
+
// back a page when you hit command+left arrow or comamnd-right arrow.
|
1065
|
+
// See https://bugzilla.mozilla.org/show_bug.cgi?id=341886
|
1066
|
+
// TODO(nicksantos): Get Firefox to fix this.
|
1067
|
+
(goog.userAgent.GECKO && e.metaKey &&
|
1068
|
+
(e.keyCode == goog.events.KeyCodes.LEFT ||
|
1069
|
+
e.keyCode == goog.events.KeyCodes.RIGHT));
|
1070
|
+
|
1071
|
+
if (block) {
|
1072
|
+
e.preventDefault();
|
1073
|
+
return false;
|
1074
|
+
} else {
|
1075
|
+
// In Gecko we have both keyCode and charCode. charCode is for human
|
1076
|
+
// readable characters like a, b and c. However pressing ctrl+c and so on
|
1077
|
+
// also causes charCode to be set.
|
1078
|
+
|
1079
|
+
// TODO(arv): Del at end of field or backspace at beginning should be
|
1080
|
+
// ignored.
|
1081
|
+
this.gotGeneratingKey_ = e.charCode ||
|
1082
|
+
goog.editor.Field.isGeneratingKey_(e, goog.userAgent.GECKO);
|
1083
|
+
if (this.gotGeneratingKey_) {
|
1084
|
+
this.dispatchBeforeChange();
|
1085
|
+
// TODO(robbyw): Should we return the value of the above?
|
1086
|
+
}
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
return true;
|
1090
|
+
};
|
1091
|
+
|
1092
|
+
|
1093
|
+
/**
|
1094
|
+
* Keycodes that result in a selectionchange event (e.g. the cursor moving).
|
1095
|
+
* @enum {number}
|
1096
|
+
* @private
|
1097
|
+
*/
|
1098
|
+
goog.editor.Field.SELECTION_CHANGE_KEYCODES_ = {
|
1099
|
+
8: 1, // backspace
|
1100
|
+
9: 1, // tab
|
1101
|
+
13: 1, // enter
|
1102
|
+
33: 1, // page up
|
1103
|
+
34: 1, // page down
|
1104
|
+
35: 1, // end
|
1105
|
+
36: 1, // home
|
1106
|
+
37: 1, // left
|
1107
|
+
38: 1, // up
|
1108
|
+
39: 1, // right
|
1109
|
+
40: 1, // down
|
1110
|
+
46: 1 // delete
|
1111
|
+
};
|
1112
|
+
|
1113
|
+
|
1114
|
+
/**
|
1115
|
+
* Map of keyCodes (not charCodes) that when used in conjunction with the
|
1116
|
+
* Ctrl key cause selection changes in the field contents. These are the keys
|
1117
|
+
* that are not handled by the basic formatting trogedit plugins. Note that
|
1118
|
+
* combinations like Ctrl-left etc are already handled in
|
1119
|
+
* SELECTION_CHANGE_KEYCODES_
|
1120
|
+
* @type {Object}
|
1121
|
+
* @private
|
1122
|
+
*/
|
1123
|
+
goog.editor.Field.CTRL_KEYS_CAUSING_SELECTION_CHANGES_ = {
|
1124
|
+
65: true, // A
|
1125
|
+
86: true, // V
|
1126
|
+
88: true // X
|
1127
|
+
};
|
1128
|
+
|
1129
|
+
|
1130
|
+
/**
|
1131
|
+
* Map of keyCodes (not charCodes) that might need to be handled as a keyboard
|
1132
|
+
* shortcut (even when ctrl/meta key is not pressed) by some plugin. Currently
|
1133
|
+
* it is a small list. If it grows too big we can optimize it by using ranges
|
1134
|
+
* or extending it from SELECTION_CHANGE_KEYCODES_
|
1135
|
+
* @type {Object}
|
1136
|
+
* @private
|
1137
|
+
*/
|
1138
|
+
goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_ = {
|
1139
|
+
8: 1, // backspace
|
1140
|
+
9: 1, // tab
|
1141
|
+
13: 1, // enter
|
1142
|
+
27: 1, // esc
|
1143
|
+
33: 1, // page up
|
1144
|
+
34: 1, // page down
|
1145
|
+
37: 1, // left
|
1146
|
+
38: 1, // up
|
1147
|
+
39: 1, // right
|
1148
|
+
40: 1 // down
|
1149
|
+
};
|
1150
|
+
|
1151
|
+
|
1152
|
+
/**
|
1153
|
+
* Calls all the plugins of the given operation, in sequence, with the
|
1154
|
+
* given arguments. This is short-circuiting: once one plugin cancels
|
1155
|
+
* the event, no more plugins will be invoked.
|
1156
|
+
* @param {goog.editor.Plugin.Op} op A plugin op.
|
1157
|
+
* @param {...*} var_args The arguments to the plugin.
|
1158
|
+
* @return {boolean} True if one of the plugins cancel the event, false
|
1159
|
+
* otherwise.
|
1160
|
+
* @private
|
1161
|
+
*/
|
1162
|
+
goog.editor.Field.prototype.invokeShortCircuitingOp_ = function(op, var_args) {
|
1163
|
+
var plugins = this.indexedPlugins_[op];
|
1164
|
+
var argList = goog.array.slice(arguments, 1);
|
1165
|
+
for (var i = 0; i < plugins.length; ++i) {
|
1166
|
+
// If the plugin returns true, that means it handled the event and
|
1167
|
+
// we shouldn't propagate to the other plugins.
|
1168
|
+
var plugin = plugins[i];
|
1169
|
+
if ((plugin.isEnabled(this) ||
|
1170
|
+
goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) &&
|
1171
|
+
plugin[goog.editor.Plugin.OPCODE[op]].apply(plugin, argList)) {
|
1172
|
+
// Only one plugin is allowed to handle the event. If for some reason
|
1173
|
+
// a plugin wants to handle it and still allow other plugins to handle
|
1174
|
+
// it, it shouldn't return true.
|
1175
|
+
return true;
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
return false;
|
1180
|
+
};
|
1181
|
+
|
1182
|
+
|
1183
|
+
/**
|
1184
|
+
* Invoke this operation on all plugins with the given arguments.
|
1185
|
+
* @param {goog.editor.Plugin.Op} op A plugin op.
|
1186
|
+
* @param {...*} var_args The arguments to the plugin.
|
1187
|
+
* @private
|
1188
|
+
*/
|
1189
|
+
goog.editor.Field.prototype.invokeOp_ = function(op, var_args) {
|
1190
|
+
var plugins = this.indexedPlugins_[op];
|
1191
|
+
var argList = goog.array.slice(arguments, 1);
|
1192
|
+
for (var i = 0; i < plugins.length; ++i) {
|
1193
|
+
var plugin = plugins[i];
|
1194
|
+
if (plugin.isEnabled(this) ||
|
1195
|
+
goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) {
|
1196
|
+
plugin[goog.editor.Plugin.OPCODE[op]].apply(plugin, argList);
|
1197
|
+
}
|
1198
|
+
}
|
1199
|
+
};
|
1200
|
+
|
1201
|
+
|
1202
|
+
/**
|
1203
|
+
* Reduce this argument over all plugins. The result of each plugin invocation
|
1204
|
+
* will be passed to the next plugin invocation. See goog.array.reduce.
|
1205
|
+
* @param {goog.editor.Plugin.Op} op A plugin op.
|
1206
|
+
* @param {string} arg The argument to reduce. For now, we assume it's a
|
1207
|
+
* string, but we should widen this later if there are reducing
|
1208
|
+
* plugins that don't operate on strings.
|
1209
|
+
* @param {...*} var_args Any extra arguments to pass to the plugin. These args
|
1210
|
+
* will not be reduced.
|
1211
|
+
* @return {string} The reduced argument.
|
1212
|
+
* @private
|
1213
|
+
*/
|
1214
|
+
goog.editor.Field.prototype.reduceOp_ = function(op, arg, var_args) {
|
1215
|
+
var plugins = this.indexedPlugins_[op];
|
1216
|
+
var argList = goog.array.slice(arguments, 1);
|
1217
|
+
for (var i = 0; i < plugins.length; ++i) {
|
1218
|
+
var plugin = plugins[i];
|
1219
|
+
if (plugin.isEnabled(this) ||
|
1220
|
+
goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) {
|
1221
|
+
argList[0] = plugin[goog.editor.Plugin.OPCODE[op]].apply(
|
1222
|
+
plugin, argList);
|
1223
|
+
}
|
1224
|
+
}
|
1225
|
+
return argList[0];
|
1226
|
+
};
|
1227
|
+
|
1228
|
+
|
1229
|
+
/**
|
1230
|
+
* Prepare the given contents, then inject them into the editable field.
|
1231
|
+
* @param {?string} contents The contents to prepare.
|
1232
|
+
* @param {Element} field The field element.
|
1233
|
+
* @protected
|
1234
|
+
*/
|
1235
|
+
goog.editor.Field.prototype.injectContents = function(contents, field) {
|
1236
|
+
var styles = {};
|
1237
|
+
var newHtml = this.getInjectableContents(contents, styles);
|
1238
|
+
goog.style.setStyle(field, styles);
|
1239
|
+
goog.editor.node.replaceInnerHtml(field, newHtml);
|
1240
|
+
};
|
1241
|
+
|
1242
|
+
|
1243
|
+
/**
|
1244
|
+
* Returns prepared contents that can be injected into the editable field.
|
1245
|
+
* @param {?string} contents The contents to prepare.
|
1246
|
+
* @param {Object} styles A map that will be populated with styles that should
|
1247
|
+
* be applied to the field element together with the contents.
|
1248
|
+
* @return {string} The prepared contents.
|
1249
|
+
*/
|
1250
|
+
goog.editor.Field.prototype.getInjectableContents = function(contents, styles) {
|
1251
|
+
return this.reduceOp_(
|
1252
|
+
goog.editor.Plugin.Op.PREPARE_CONTENTS_HTML, contents || '', styles);
|
1253
|
+
};
|
1254
|
+
|
1255
|
+
|
1256
|
+
/**
|
1257
|
+
* Handles keydown on the field.
|
1258
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1259
|
+
* @private
|
1260
|
+
*/
|
1261
|
+
goog.editor.Field.prototype.handleKeyDown_ = function(e) {
|
1262
|
+
if (!goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
1263
|
+
if (!this.handleBeforeChangeKeyEvent_(e)) {
|
1264
|
+
return;
|
1265
|
+
}
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
if (!this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYDOWN, e) &&
|
1269
|
+
goog.editor.BrowserFeature.USES_KEYDOWN) {
|
1270
|
+
this.handleKeyboardShortcut_(e);
|
1271
|
+
}
|
1272
|
+
};
|
1273
|
+
|
1274
|
+
|
1275
|
+
/**
|
1276
|
+
* Handles keypress on the field.
|
1277
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1278
|
+
* @private
|
1279
|
+
*/
|
1280
|
+
goog.editor.Field.prototype.handleKeyPress_ = function(e) {
|
1281
|
+
if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
1282
|
+
if (!this.handleBeforeChangeKeyEvent_(e)) {
|
1283
|
+
return;
|
1284
|
+
}
|
1285
|
+
} else {
|
1286
|
+
// In IE only keys that generate output trigger keypress
|
1287
|
+
// In Mozilla charCode is set for keys generating content.
|
1288
|
+
this.gotGeneratingKey_ = true;
|
1289
|
+
this.dispatchBeforeChange();
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
if (!this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYPRESS, e) &&
|
1293
|
+
!goog.editor.BrowserFeature.USES_KEYDOWN) {
|
1294
|
+
this.handleKeyboardShortcut_(e);
|
1295
|
+
}
|
1296
|
+
};
|
1297
|
+
|
1298
|
+
|
1299
|
+
/**
|
1300
|
+
* Handles keyup on the field.
|
1301
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1302
|
+
* @private
|
1303
|
+
*/
|
1304
|
+
goog.editor.Field.prototype.handleKeyUp_ = function(e) {
|
1305
|
+
if (!goog.editor.BrowserFeature.USE_MUTATION_EVENTS &&
|
1306
|
+
(this.gotGeneratingKey_ ||
|
1307
|
+
goog.editor.Field.isSpecialGeneratingKey_(e))) {
|
1308
|
+
// The special keys won't have set the gotGeneratingKey flag, so we check
|
1309
|
+
// for them explicitly
|
1310
|
+
this.handleChange();
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYUP, e);
|
1314
|
+
|
1315
|
+
if (this.isEventStopped(goog.editor.Field.EventType.SELECTIONCHANGE)) {
|
1316
|
+
return;
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
if (goog.editor.Field.SELECTION_CHANGE_KEYCODES_[e.keyCode] ||
|
1320
|
+
((e.ctrlKey || e.metaKey) &&
|
1321
|
+
goog.editor.Field.CTRL_KEYS_CAUSING_SELECTION_CHANGES_[e.keyCode])) {
|
1322
|
+
this.selectionChangeTimer_.start();
|
1323
|
+
}
|
1324
|
+
};
|
1325
|
+
|
1326
|
+
|
1327
|
+
/**
|
1328
|
+
* Handles keyboard shortcuts on the field. Note that we bake this into our
|
1329
|
+
* handleKeyPress/handleKeyDown rather than using goog.events.KeyHandler or
|
1330
|
+
* goog.ui.KeyboardShortcutHandler for performance reasons. Since these
|
1331
|
+
* are handled on every key stroke, we do not want to be going out to the
|
1332
|
+
* event system every time.
|
1333
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1334
|
+
* @private
|
1335
|
+
*/
|
1336
|
+
goog.editor.Field.prototype.handleKeyboardShortcut_ = function(e) {
|
1337
|
+
// Alt key is used for i18n languages to enter certain characters. like
|
1338
|
+
// control + alt + z (used for IMEs) and control + alt + s for Polish.
|
1339
|
+
// So we don't invoke handleKeyboardShortcut at all for alt keys.
|
1340
|
+
if (e.altKey) {
|
1341
|
+
return;
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
var isModifierPressed = goog.userAgent.MAC ? e.metaKey : e.ctrlKey;
|
1345
|
+
if (isModifierPressed ||
|
1346
|
+
goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_[e.keyCode]) {
|
1347
|
+
// TODO(user): goog.events.KeyHandler uses much more complicated logic
|
1348
|
+
// to determine key. Consider changing to what they do.
|
1349
|
+
var key = e.charCode || e.keyCode;
|
1350
|
+
|
1351
|
+
if (key == 17) { // Ctrl key
|
1352
|
+
// In IE and Webkit pressing Ctrl key itself results in this event.
|
1353
|
+
return;
|
1354
|
+
}
|
1355
|
+
|
1356
|
+
var stringKey = String.fromCharCode(key).toLowerCase();
|
1357
|
+
if (this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.SHORTCUT,
|
1358
|
+
e, stringKey, isModifierPressed)) {
|
1359
|
+
e.preventDefault();
|
1360
|
+
// We don't call stopPropagation as some other handler outside of
|
1361
|
+
// trogedit might need it.
|
1362
|
+
}
|
1363
|
+
}
|
1364
|
+
};
|
1365
|
+
|
1366
|
+
|
1367
|
+
/**
|
1368
|
+
* Executes an editing command as per the registered plugins.
|
1369
|
+
* @param {string} command The command to execute.
|
1370
|
+
* @param {...*} var_args Any additional parameters needed to execute the
|
1371
|
+
* command.
|
1372
|
+
* @return {*} False if the command wasn't handled, otherwise, the result of
|
1373
|
+
* the command.
|
1374
|
+
*/
|
1375
|
+
goog.editor.Field.prototype.execCommand = function(command, var_args) {
|
1376
|
+
var args = arguments;
|
1377
|
+
var result;
|
1378
|
+
|
1379
|
+
var plugins = this.indexedPlugins_[goog.editor.Plugin.Op.EXEC_COMMAND];
|
1380
|
+
for (var i = 0; i < plugins.length; ++i) {
|
1381
|
+
// If the plugin supports the command, that means it handled the
|
1382
|
+
// event and we shouldn't propagate to the other plugins.
|
1383
|
+
var plugin = plugins[i];
|
1384
|
+
if (plugin.isEnabled(this) && plugin.isSupportedCommand(command)) {
|
1385
|
+
result = plugin.execCommand.apply(plugin, args);
|
1386
|
+
break;
|
1387
|
+
}
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
return result;
|
1391
|
+
};
|
1392
|
+
|
1393
|
+
|
1394
|
+
/**
|
1395
|
+
* Gets the value of command(s).
|
1396
|
+
* @param {string|Array.<string>} commands String name(s) of the command.
|
1397
|
+
* @return {*} Value of each command. Returns false (or array of falses)
|
1398
|
+
* if designMode is off or the field is otherwise uneditable, and
|
1399
|
+
* there are no activeOnUneditable plugins for the command.
|
1400
|
+
*/
|
1401
|
+
goog.editor.Field.prototype.queryCommandValue = function(commands) {
|
1402
|
+
var isEditable = this.isLoaded() && this.isSelectionEditable();
|
1403
|
+
if (goog.isString(commands)) {
|
1404
|
+
return this.queryCommandValueInternal_(commands, isEditable);
|
1405
|
+
} else {
|
1406
|
+
var state = {};
|
1407
|
+
for (var i = 0; i < commands.length; i++) {
|
1408
|
+
state[commands[i]] = this.queryCommandValueInternal_(commands[i],
|
1409
|
+
isEditable);
|
1410
|
+
}
|
1411
|
+
return state;
|
1412
|
+
}
|
1413
|
+
};
|
1414
|
+
|
1415
|
+
|
1416
|
+
/**
|
1417
|
+
* Gets the value of this command.
|
1418
|
+
* @param {string} command The command to check.
|
1419
|
+
* @param {boolean} isEditable Whether the field is currently editable.
|
1420
|
+
* @return {*} The state of this command. Null if not handled.
|
1421
|
+
* False if the field is uneditable and there are no handlers for
|
1422
|
+
* uneditable commands.
|
1423
|
+
* @private
|
1424
|
+
*/
|
1425
|
+
goog.editor.Field.prototype.queryCommandValueInternal_ = function(command,
|
1426
|
+
isEditable) {
|
1427
|
+
var plugins = this.indexedPlugins_[goog.editor.Plugin.Op.QUERY_COMMAND];
|
1428
|
+
for (var i = 0; i < plugins.length; ++i) {
|
1429
|
+
var plugin = plugins[i];
|
1430
|
+
if (plugin.isEnabled(this) && plugin.isSupportedCommand(command) &&
|
1431
|
+
(isEditable || plugin.activeOnUneditableFields())) {
|
1432
|
+
return plugin.queryCommandValue(command);
|
1433
|
+
}
|
1434
|
+
}
|
1435
|
+
return isEditable ? null : false;
|
1436
|
+
};
|
1437
|
+
|
1438
|
+
|
1439
|
+
/**
|
1440
|
+
* Fires a change event only if the attribute change effects the editiable
|
1441
|
+
* field. We ignore events that are internal browser events (ie scrollbar
|
1442
|
+
* state change)
|
1443
|
+
* @param {Function} handler The function to call if this is not an internal
|
1444
|
+
* browser event.
|
1445
|
+
* @param {goog.events.BrowserEvent} browserEvent The browser event.
|
1446
|
+
* @protected
|
1447
|
+
*/
|
1448
|
+
goog.editor.Field.prototype.handleDomAttrChange =
|
1449
|
+
function(handler, browserEvent) {
|
1450
|
+
if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
|
1451
|
+
return;
|
1452
|
+
}
|
1453
|
+
|
1454
|
+
var e = browserEvent.getBrowserEvent();
|
1455
|
+
|
1456
|
+
// For XUL elements, since we don't care what they are doing
|
1457
|
+
try {
|
1458
|
+
if (e.originalTarget.prefix || e.originalTarget.nodeName == 'scrollbar') {
|
1459
|
+
return;
|
1460
|
+
}
|
1461
|
+
} catch (ex1) {
|
1462
|
+
// Some XUL nodes don't like you reading their properties. If we got
|
1463
|
+
// the exception, this implies a XUL node so we can return.
|
1464
|
+
return;
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
// Check if prev and new values are different, sometimes this fires when
|
1468
|
+
// nothing has really changed.
|
1469
|
+
if (e.prevValue == e.newValue) {
|
1470
|
+
return;
|
1471
|
+
}
|
1472
|
+
handler.call(this, e);
|
1473
|
+
};
|
1474
|
+
|
1475
|
+
|
1476
|
+
/**
|
1477
|
+
* Handle a mutation event.
|
1478
|
+
* @param {goog.events.BrowserEvent|Event} e The browser event.
|
1479
|
+
* @private
|
1480
|
+
*/
|
1481
|
+
goog.editor.Field.prototype.handleMutationEventGecko_ = function(e) {
|
1482
|
+
if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
|
1483
|
+
return;
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
e = e.getBrowserEvent ? e.getBrowserEvent() : e;
|
1487
|
+
// For people with firebug, firebug sets this property on elements it is
|
1488
|
+
// inserting into the dom.
|
1489
|
+
if (e.target.firebugIgnore) {
|
1490
|
+
return;
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
this.isModified_ = true;
|
1494
|
+
this.isEverModified_ = true;
|
1495
|
+
this.changeTimerGecko_.start();
|
1496
|
+
};
|
1497
|
+
|
1498
|
+
|
1499
|
+
/**
|
1500
|
+
* Handle drop events. Deal with focus/selection issues and set the document
|
1501
|
+
* as changed.
|
1502
|
+
* @param {goog.events.BrowserEvent} e The browser event.
|
1503
|
+
* @private
|
1504
|
+
*/
|
1505
|
+
goog.editor.Field.prototype.handleDrop_ = function(e) {
|
1506
|
+
if (goog.userAgent.IE) {
|
1507
|
+
// TODO(user): This should really be done in the loremipsum plugin.
|
1508
|
+
this.execCommand(goog.editor.Command.CLEAR_LOREM, true);
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
// TODO(user): I just moved this code to this location, but I wonder why
|
1512
|
+
// it is only done for this case. Investigate.
|
1513
|
+
if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
1514
|
+
this.dispatchFocusAndBeforeFocus_();
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
this.dispatchChange();
|
1518
|
+
};
|
1519
|
+
|
1520
|
+
|
1521
|
+
/**
|
1522
|
+
* @return {HTMLIFrameElement} The iframe that's body is editable.
|
1523
|
+
* @protected
|
1524
|
+
*/
|
1525
|
+
goog.editor.Field.prototype.getEditableIframe = function() {
|
1526
|
+
var dh;
|
1527
|
+
if (this.usesIframe() && (dh = this.getEditableDomHelper())) {
|
1528
|
+
// If the iframe has been destroyed, the dh could still exist since the
|
1529
|
+
// node may not be gc'ed, but fetching the window can fail.
|
1530
|
+
var win = dh.getWindow();
|
1531
|
+
return /** @type {HTMLIFrameElement} */ (win && win.frameElement);
|
1532
|
+
}
|
1533
|
+
return null;
|
1534
|
+
};
|
1535
|
+
|
1536
|
+
|
1537
|
+
/**
|
1538
|
+
* @return {goog.dom.DomHelper?} The dom helper for the editable node.
|
1539
|
+
*/
|
1540
|
+
goog.editor.Field.prototype.getEditableDomHelper = function() {
|
1541
|
+
return this.editableDomHelper;
|
1542
|
+
};
|
1543
|
+
|
1544
|
+
|
1545
|
+
/**
|
1546
|
+
* @return {goog.dom.AbstractRange?} Closure range object wrapping the selection
|
1547
|
+
* in this field or null if this field is not currently editable.
|
1548
|
+
*/
|
1549
|
+
goog.editor.Field.prototype.getRange = function() {
|
1550
|
+
var win = this.editableDomHelper && this.editableDomHelper.getWindow();
|
1551
|
+
return win && goog.dom.Range.createFromWindow(win);
|
1552
|
+
};
|
1553
|
+
|
1554
|
+
|
1555
|
+
/**
|
1556
|
+
* Dispatch a selection change event, optionally caused by the given browser
|
1557
|
+
* event or selecting the given target.
|
1558
|
+
* @param {goog.events.BrowserEvent=} opt_e Optional browser event causing this
|
1559
|
+
* event.
|
1560
|
+
* @param {Node=} opt_target The node the selection changed to.
|
1561
|
+
*/
|
1562
|
+
goog.editor.Field.prototype.dispatchSelectionChangeEvent = function(
|
1563
|
+
opt_e, opt_target) {
|
1564
|
+
if (this.isEventStopped(goog.editor.Field.EventType.SELECTIONCHANGE)) {
|
1565
|
+
return;
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
// The selection is editable only if the selection is inside the
|
1569
|
+
// editable field.
|
1570
|
+
var range = this.getRange();
|
1571
|
+
var rangeContainer = range && range.getContainerElement();
|
1572
|
+
this.isSelectionEditable_ = !!rangeContainer &&
|
1573
|
+
goog.dom.contains(this.getElement(), rangeContainer);
|
1574
|
+
|
1575
|
+
this.dispatchCommandValueChange();
|
1576
|
+
this.dispatchEvent({
|
1577
|
+
type: goog.editor.Field.EventType.SELECTIONCHANGE,
|
1578
|
+
originalType: opt_e && opt_e.type
|
1579
|
+
});
|
1580
|
+
|
1581
|
+
this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.SELECTION,
|
1582
|
+
opt_e, opt_target);
|
1583
|
+
};
|
1584
|
+
|
1585
|
+
|
1586
|
+
/**
|
1587
|
+
* Dispatch a selection change event using a browser event that was
|
1588
|
+
* asynchronously saved earlier.
|
1589
|
+
* @private
|
1590
|
+
*/
|
1591
|
+
goog.editor.Field.prototype.handleSelectionChangeTimer_ = function() {
|
1592
|
+
var t = this.selectionChangeTarget_;
|
1593
|
+
this.selectionChangeTarget_ = null;
|
1594
|
+
this.dispatchSelectionChangeEvent(undefined, t);
|
1595
|
+
};
|
1596
|
+
|
1597
|
+
|
1598
|
+
/**
|
1599
|
+
* This dispatches the beforechange event on the editable field
|
1600
|
+
*/
|
1601
|
+
goog.editor.Field.prototype.dispatchBeforeChange = function() {
|
1602
|
+
if (this.isEventStopped(goog.editor.Field.EventType.BEFORECHANGE)) {
|
1603
|
+
return;
|
1604
|
+
}
|
1605
|
+
|
1606
|
+
this.dispatchEvent(goog.editor.Field.EventType.BEFORECHANGE);
|
1607
|
+
};
|
1608
|
+
|
1609
|
+
|
1610
|
+
/**
|
1611
|
+
* This dispatches the beforetab event on the editable field. If this event is
|
1612
|
+
* cancelled, then the default tab behavior is prevented.
|
1613
|
+
* @param {goog.events.BrowserEvent} e The tab event.
|
1614
|
+
* @private
|
1615
|
+
* @return {boolean} The result of dispatchEvent.
|
1616
|
+
*/
|
1617
|
+
goog.editor.Field.prototype.dispatchBeforeTab_ = function(e) {
|
1618
|
+
return this.dispatchEvent({
|
1619
|
+
type: goog.editor.Field.EventType.BEFORETAB,
|
1620
|
+
shiftKey: e.shiftKey,
|
1621
|
+
altKey: e.altKey,
|
1622
|
+
ctrlKey: e.ctrlKey
|
1623
|
+
});
|
1624
|
+
};
|
1625
|
+
|
1626
|
+
|
1627
|
+
/**
|
1628
|
+
* Temporarily ignore change events. If the time has already been set, it will
|
1629
|
+
* fire immediately now. Further setting of the timer is stopped and
|
1630
|
+
* dispatching of events is stopped until startChangeEvents is called.
|
1631
|
+
* @param {boolean=} opt_stopChange Whether to ignore base change events.
|
1632
|
+
* @param {boolean=} opt_stopDelayedChange Whether to ignore delayed change
|
1633
|
+
* events.
|
1634
|
+
*/
|
1635
|
+
goog.editor.Field.prototype.stopChangeEvents = function(opt_stopChange,
|
1636
|
+
opt_stopDelayedChange) {
|
1637
|
+
if (opt_stopChange) {
|
1638
|
+
if (this.changeTimerGecko_) {
|
1639
|
+
this.changeTimerGecko_.fireIfActive();
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
this.stopEvent(goog.editor.Field.EventType.CHANGE);
|
1643
|
+
}
|
1644
|
+
if (opt_stopDelayedChange) {
|
1645
|
+
this.clearDelayedChange();
|
1646
|
+
this.stopEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
|
1647
|
+
}
|
1648
|
+
};
|
1649
|
+
|
1650
|
+
|
1651
|
+
/**
|
1652
|
+
* Start change events again and fire once if desired.
|
1653
|
+
* @param {boolean=} opt_fireChange Whether to fire the change event
|
1654
|
+
* immediately.
|
1655
|
+
* @param {boolean=} opt_fireDelayedChange Whether to fire the delayed change
|
1656
|
+
* event immediately.
|
1657
|
+
*/
|
1658
|
+
goog.editor.Field.prototype.startChangeEvents = function(opt_fireChange,
|
1659
|
+
opt_fireDelayedChange) {
|
1660
|
+
|
1661
|
+
if (!opt_fireChange && this.changeTimerGecko_) {
|
1662
|
+
// In the case where change events were stopped and we're not firing
|
1663
|
+
// them on start, the user was trying to suppress all change or delayed
|
1664
|
+
// change events. Clear the change timer now while the events are still
|
1665
|
+
// stopped so that its firing doesn't fire a stopped change event, or
|
1666
|
+
// queue up a delayed change event that we were trying to stop.
|
1667
|
+
this.changeTimerGecko_.fireIfActive();
|
1668
|
+
}
|
1669
|
+
|
1670
|
+
this.startEvent(goog.editor.Field.EventType.CHANGE);
|
1671
|
+
this.startEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
|
1672
|
+
if (opt_fireChange) {
|
1673
|
+
this.handleChange();
|
1674
|
+
}
|
1675
|
+
|
1676
|
+
if (opt_fireDelayedChange) {
|
1677
|
+
this.dispatchDelayedChange_();
|
1678
|
+
}
|
1679
|
+
};
|
1680
|
+
|
1681
|
+
|
1682
|
+
/**
|
1683
|
+
* Stops the event of the given type from being dispatched.
|
1684
|
+
* @param {goog.editor.Field.EventType} eventType type of event to stop.
|
1685
|
+
*/
|
1686
|
+
goog.editor.Field.prototype.stopEvent = function(eventType) {
|
1687
|
+
this.stoppedEvents_[eventType] = 1;
|
1688
|
+
};
|
1689
|
+
|
1690
|
+
|
1691
|
+
/**
|
1692
|
+
* Re-starts the event of the given type being dispatched, if it had
|
1693
|
+
* previously been stopped with stopEvent().
|
1694
|
+
* @param {goog.editor.Field.EventType} eventType type of event to start.
|
1695
|
+
*/
|
1696
|
+
goog.editor.Field.prototype.startEvent = function(eventType) {
|
1697
|
+
// Toggling this bit on/off instead of deleting it/re-adding it
|
1698
|
+
// saves array allocations.
|
1699
|
+
this.stoppedEvents_[eventType] = 0;
|
1700
|
+
};
|
1701
|
+
|
1702
|
+
|
1703
|
+
/**
|
1704
|
+
* Block an event for a short amount of time. Intended
|
1705
|
+
* for the situation where an event pair fires in quick succession
|
1706
|
+
* (e.g., mousedown/mouseup, keydown/keyup, focus/blur),
|
1707
|
+
* and we want the second event in the pair to get "debounced."
|
1708
|
+
*
|
1709
|
+
* WARNING: This should never be used to solve race conditions or for
|
1710
|
+
* mission-critical actions. It should only be used for UI improvements,
|
1711
|
+
* where it's okay if the behavior is non-deterministic.
|
1712
|
+
*
|
1713
|
+
* @param {goog.editor.Field.EventType} eventType type of event to debounce.
|
1714
|
+
*/
|
1715
|
+
goog.editor.Field.prototype.debounceEvent = function(eventType) {
|
1716
|
+
this.debouncedEvents_[eventType] = goog.now();
|
1717
|
+
};
|
1718
|
+
|
1719
|
+
|
1720
|
+
/**
|
1721
|
+
* Checks if the event of the given type has stopped being dispatched
|
1722
|
+
* @param {goog.editor.Field.EventType} eventType type of event to check.
|
1723
|
+
* @return {boolean} true if the event has been stopped with stopEvent().
|
1724
|
+
* @protected
|
1725
|
+
*/
|
1726
|
+
goog.editor.Field.prototype.isEventStopped = function(eventType) {
|
1727
|
+
return !!this.stoppedEvents_[eventType] ||
|
1728
|
+
(this.debouncedEvents_[eventType] &&
|
1729
|
+
(goog.now() - this.debouncedEvents_[eventType] <=
|
1730
|
+
goog.editor.Field.DEBOUNCE_TIME_MS_));
|
1731
|
+
};
|
1732
|
+
|
1733
|
+
|
1734
|
+
/**
|
1735
|
+
* Calls a function to manipulate the dom of this field. This method should be
|
1736
|
+
* used whenever Trogedit clients need to modify the dom of the field, so that
|
1737
|
+
* delayed change events are handled appropriately. Extra delayed change events
|
1738
|
+
* will cause undesired states to be added to the undo-redo stack. This method
|
1739
|
+
* will always fire at most one delayed change event, depending on the value of
|
1740
|
+
* {@code opt_preventDelayedChange}.
|
1741
|
+
*
|
1742
|
+
* @param {function()} func The function to call that will manipulate the dom.
|
1743
|
+
* @param {boolean=} opt_preventDelayedChange Whether delayed change should be
|
1744
|
+
* prevented after calling {@code func}. Defaults to always firing
|
1745
|
+
* delayed change.
|
1746
|
+
* @param {Object=} opt_handler Object in whose scope to call the listener.
|
1747
|
+
*/
|
1748
|
+
goog.editor.Field.prototype.manipulateDom = function(func,
|
1749
|
+
opt_preventDelayedChange, opt_handler) {
|
1750
|
+
|
1751
|
+
this.stopChangeEvents(true, true);
|
1752
|
+
// We don't want any problems with the passed in function permanently
|
1753
|
+
// stopping change events. That would break Trogedit.
|
1754
|
+
try {
|
1755
|
+
func.call(opt_handler);
|
1756
|
+
} finally {
|
1757
|
+
// If the field isn't loaded then change and delayed change events will be
|
1758
|
+
// started as part of the onload behavior.
|
1759
|
+
if (this.isLoaded()) {
|
1760
|
+
// We assume that func always modified the dom and so fire a single change
|
1761
|
+
// event. Delayed change is only fired if not prevented by the user.
|
1762
|
+
if (opt_preventDelayedChange) {
|
1763
|
+
this.startEvent(goog.editor.Field.EventType.CHANGE);
|
1764
|
+
this.handleChange();
|
1765
|
+
this.startEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
|
1766
|
+
} else {
|
1767
|
+
this.dispatchChange();
|
1768
|
+
}
|
1769
|
+
}
|
1770
|
+
}
|
1771
|
+
};
|
1772
|
+
|
1773
|
+
|
1774
|
+
/**
|
1775
|
+
* Dispatches a command value change event.
|
1776
|
+
* @param {Array.<string>=} opt_commands Commands whose state has
|
1777
|
+
* changed.
|
1778
|
+
*/
|
1779
|
+
goog.editor.Field.prototype.dispatchCommandValueChange =
|
1780
|
+
function(opt_commands) {
|
1781
|
+
if (opt_commands) {
|
1782
|
+
this.dispatchEvent({
|
1783
|
+
type: goog.editor.Field.EventType.COMMAND_VALUE_CHANGE,
|
1784
|
+
commands: opt_commands
|
1785
|
+
});
|
1786
|
+
} else {
|
1787
|
+
this.dispatchEvent(goog.editor.Field.EventType.COMMAND_VALUE_CHANGE);
|
1788
|
+
}
|
1789
|
+
};
|
1790
|
+
|
1791
|
+
|
1792
|
+
/**
|
1793
|
+
* Dispatches the appropriate set of change events. This only fires
|
1794
|
+
* synchronous change events in blended-mode, iframe-using mozilla. It just
|
1795
|
+
* starts the appropriate timer for goog.editor.Field.EventType.DELAYEDCHANGE.
|
1796
|
+
* This also starts up change events again if they were stopped.
|
1797
|
+
*
|
1798
|
+
* @param {boolean=} opt_noDelay True if
|
1799
|
+
* goog.editor.Field.EventType.DELAYEDCHANGE should be fired syncronously.
|
1800
|
+
*/
|
1801
|
+
goog.editor.Field.prototype.dispatchChange = function(opt_noDelay) {
|
1802
|
+
this.startChangeEvents(true, opt_noDelay);
|
1803
|
+
};
|
1804
|
+
|
1805
|
+
|
1806
|
+
/**
|
1807
|
+
* Handle a change in the Editable Field. Marks the field has modified,
|
1808
|
+
* dispatches the change event on the editable field (moz only), starts the
|
1809
|
+
* timer for the delayed change event. Note that these actions only occur if
|
1810
|
+
* the proper events are not stopped.
|
1811
|
+
*/
|
1812
|
+
goog.editor.Field.prototype.handleChange = function() {
|
1813
|
+
if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
|
1814
|
+
return;
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
// Clear the changeTimerGecko_ if it's active, since any manual call to
|
1818
|
+
// handle change is equiavlent to changeTimerGecko_.fire().
|
1819
|
+
if (this.changeTimerGecko_) {
|
1820
|
+
this.changeTimerGecko_.stop();
|
1821
|
+
}
|
1822
|
+
|
1823
|
+
this.isModified_ = true;
|
1824
|
+
this.isEverModified_ = true;
|
1825
|
+
|
1826
|
+
if (this.isEventStopped(goog.editor.Field.EventType.DELAYEDCHANGE)) {
|
1827
|
+
return;
|
1828
|
+
}
|
1829
|
+
|
1830
|
+
this.delayedChangeTimer_.start();
|
1831
|
+
};
|
1832
|
+
|
1833
|
+
|
1834
|
+
/**
|
1835
|
+
* Dispatch a delayed change event.
|
1836
|
+
* @private
|
1837
|
+
*/
|
1838
|
+
goog.editor.Field.prototype.dispatchDelayedChange_ = function() {
|
1839
|
+
if (this.isEventStopped(goog.editor.Field.EventType.DELAYEDCHANGE)) {
|
1840
|
+
return;
|
1841
|
+
}
|
1842
|
+
// Clear the delayedChangeTimer_ if it's active, since any manual call to
|
1843
|
+
// dispatchDelayedChange_ is equivalent to delayedChangeTimer_.fire().
|
1844
|
+
this.delayedChangeTimer_.stop();
|
1845
|
+
this.isModified_ = false;
|
1846
|
+
this.dispatchEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
|
1847
|
+
};
|
1848
|
+
|
1849
|
+
|
1850
|
+
/**
|
1851
|
+
* Don't wait for the timer and just fire the delayed change event if it's
|
1852
|
+
* pending.
|
1853
|
+
*/
|
1854
|
+
goog.editor.Field.prototype.clearDelayedChange = function() {
|
1855
|
+
// The changeTimerGecko_ will queue up a delayed change so to fully clear
|
1856
|
+
// delayed change we must also clear this timer.
|
1857
|
+
if (this.changeTimerGecko_) {
|
1858
|
+
this.changeTimerGecko_.fireIfActive();
|
1859
|
+
}
|
1860
|
+
this.delayedChangeTimer_.fireIfActive();
|
1861
|
+
};
|
1862
|
+
|
1863
|
+
|
1864
|
+
/**
|
1865
|
+
* Dispatch beforefocus and focus for FF. Note that both of these actually
|
1866
|
+
* happen in the document's "focus" event. Unfortunately, we don't actually
|
1867
|
+
* have a way of getting in before the focus event in FF (boo! hiss!).
|
1868
|
+
* In IE, we use onfocusin for before focus and onfocus for focus.
|
1869
|
+
* @private
|
1870
|
+
*/
|
1871
|
+
goog.editor.Field.prototype.dispatchFocusAndBeforeFocus_ = function() {
|
1872
|
+
this.dispatchBeforeFocus_();
|
1873
|
+
this.dispatchFocus_();
|
1874
|
+
};
|
1875
|
+
|
1876
|
+
|
1877
|
+
/**
|
1878
|
+
* Dispatches a before focus event.
|
1879
|
+
* @private
|
1880
|
+
*/
|
1881
|
+
goog.editor.Field.prototype.dispatchBeforeFocus_ = function() {
|
1882
|
+
if (this.isEventStopped(goog.editor.Field.EventType.BEFOREFOCUS)) {
|
1883
|
+
return;
|
1884
|
+
}
|
1885
|
+
|
1886
|
+
this.execCommand(goog.editor.Command.CLEAR_LOREM, true);
|
1887
|
+
this.dispatchEvent(goog.editor.Field.EventType.BEFOREFOCUS);
|
1888
|
+
};
|
1889
|
+
|
1890
|
+
|
1891
|
+
/**
|
1892
|
+
* Dispatches a focus event.
|
1893
|
+
* @private
|
1894
|
+
*/
|
1895
|
+
goog.editor.Field.prototype.dispatchFocus_ = function() {
|
1896
|
+
if (this.isEventStopped(goog.editor.Field.EventType.FOCUS)) {
|
1897
|
+
return;
|
1898
|
+
}
|
1899
|
+
goog.editor.Field.setActiveFieldId(this.id);
|
1900
|
+
|
1901
|
+
this.isSelectionEditable_ = true;
|
1902
|
+
|
1903
|
+
this.dispatchEvent(goog.editor.Field.EventType.FOCUS);
|
1904
|
+
|
1905
|
+
if (goog.editor.BrowserFeature.
|
1906
|
+
PUTS_CURSOR_BEFORE_FIRST_BLOCK_ELEMENT_ON_FOCUS) {
|
1907
|
+
// If the cursor is at the beginning of the field, make sure that it is
|
1908
|
+
// in the first user-visible line break, e.g.,
|
1909
|
+
// no selection: <div><p>...</p></div> --> <div><p>|cursor|...</p></div>
|
1910
|
+
// <div>|cursor|<p>...</p></div> --> <div><p>|cursor|...</p></div>
|
1911
|
+
// <body>|cursor|<p>...</p></body> --> <body><p>|cursor|...</p></body>
|
1912
|
+
var field = this.getElement();
|
1913
|
+
var range = this.getRange();
|
1914
|
+
|
1915
|
+
if (range) {
|
1916
|
+
var focusNode = range.getFocusNode();
|
1917
|
+
if (range.getFocusOffset() == 0 && (!focusNode || focusNode == field ||
|
1918
|
+
focusNode.tagName == goog.dom.TagName.BODY)) {
|
1919
|
+
goog.editor.range.selectNodeStart(field);
|
1920
|
+
}
|
1921
|
+
}
|
1922
|
+
}
|
1923
|
+
|
1924
|
+
if (!goog.editor.BrowserFeature.CLEARS_SELECTION_WHEN_FOCUS_LEAVES &&
|
1925
|
+
this.usesIframe()) {
|
1926
|
+
var parent = this.getEditableDomHelper().getWindow().parent;
|
1927
|
+
parent.getSelection().removeAllRanges();
|
1928
|
+
}
|
1929
|
+
};
|
1930
|
+
|
1931
|
+
|
1932
|
+
/**
|
1933
|
+
* Dispatches a blur event.
|
1934
|
+
* @protected
|
1935
|
+
*/
|
1936
|
+
goog.editor.Field.prototype.dispatchBlur = function() {
|
1937
|
+
if (this.isEventStopped(goog.editor.Field.EventType.BLUR)) {
|
1938
|
+
return;
|
1939
|
+
}
|
1940
|
+
|
1941
|
+
// Another field may have already been registered as active, so only
|
1942
|
+
// clear out the active field id if we still think this field is active.
|
1943
|
+
if (goog.editor.Field.getActiveFieldId() == this.id) {
|
1944
|
+
goog.editor.Field.setActiveFieldId(null);
|
1945
|
+
}
|
1946
|
+
|
1947
|
+
this.isSelectionEditable_ = false;
|
1948
|
+
this.dispatchEvent(goog.editor.Field.EventType.BLUR);
|
1949
|
+
};
|
1950
|
+
|
1951
|
+
|
1952
|
+
/**
|
1953
|
+
* @return {boolean} Whether the selection is editable.
|
1954
|
+
*/
|
1955
|
+
goog.editor.Field.prototype.isSelectionEditable = function() {
|
1956
|
+
return this.isSelectionEditable_;
|
1957
|
+
};
|
1958
|
+
|
1959
|
+
|
1960
|
+
/**
|
1961
|
+
* Event handler for clicks in browsers that will follow a link when the user
|
1962
|
+
* clicks, even if it's editable. We stop the click manually
|
1963
|
+
* @param {goog.events.BrowserEvent} e The event.
|
1964
|
+
* @private
|
1965
|
+
*/
|
1966
|
+
goog.editor.Field.cancelLinkClick_ = function(e) {
|
1967
|
+
if (goog.dom.getAncestorByTagNameAndClass(
|
1968
|
+
/** @type {Node} */ (e.target), goog.dom.TagName.A)) {
|
1969
|
+
e.preventDefault();
|
1970
|
+
}
|
1971
|
+
};
|
1972
|
+
|
1973
|
+
|
1974
|
+
/**
|
1975
|
+
* Handle mouse down inside the editable field.
|
1976
|
+
* @param {goog.events.BrowserEvent} e The event.
|
1977
|
+
* @private
|
1978
|
+
*/
|
1979
|
+
goog.editor.Field.prototype.handleMouseDown_ = function(e) {
|
1980
|
+
goog.editor.Field.setActiveFieldId(this.id);
|
1981
|
+
|
1982
|
+
// Open links in a new window if the user control + clicks.
|
1983
|
+
if (goog.userAgent.IE) {
|
1984
|
+
var targetElement = e.target;
|
1985
|
+
if (targetElement &&
|
1986
|
+
targetElement.tagName == goog.dom.TagName.A && e.ctrlKey) {
|
1987
|
+
this.originalDomHelper.getWindow().open(targetElement.href);
|
1988
|
+
}
|
1989
|
+
}
|
1990
|
+
this.waitingForMouseUp_ = true;
|
1991
|
+
};
|
1992
|
+
|
1993
|
+
|
1994
|
+
/**
|
1995
|
+
* Handle drag start. Needs to cancel listening for the mouse up event on the
|
1996
|
+
* window.
|
1997
|
+
* @param {goog.events.BrowserEvent} e The event.
|
1998
|
+
* @private
|
1999
|
+
*/
|
2000
|
+
goog.editor.Field.prototype.handleDragStart_ = function(e) {
|
2001
|
+
this.waitingForMouseUp_ = false;
|
2002
|
+
};
|
2003
|
+
|
2004
|
+
|
2005
|
+
/**
|
2006
|
+
* Handle mouse up inside the editable field.
|
2007
|
+
* @param {goog.events.BrowserEvent} e The event.
|
2008
|
+
* @private
|
2009
|
+
*/
|
2010
|
+
goog.editor.Field.prototype.handleMouseUp_ = function(e) {
|
2011
|
+
if (this.useWindowMouseUp_ && !this.waitingForMouseUp_) {
|
2012
|
+
return;
|
2013
|
+
}
|
2014
|
+
this.waitingForMouseUp_ = false;
|
2015
|
+
|
2016
|
+
/*
|
2017
|
+
* We fire a selection change event immediately for listeners that depend on
|
2018
|
+
* the native browser event object (e). On IE, a listener that tries to
|
2019
|
+
* retrieve the selection with goog.dom.Range may see an out-of-date
|
2020
|
+
* selection range.
|
2021
|
+
*/
|
2022
|
+
this.dispatchSelectionChangeEvent(e);
|
2023
|
+
if (goog.userAgent.IE) {
|
2024
|
+
/*
|
2025
|
+
* Fire a second selection change event for listeners that need an
|
2026
|
+
* up-to-date selection range. Save the event's target to be sent with it
|
2027
|
+
* (it's safer than saving a copy of the event itself).
|
2028
|
+
*/
|
2029
|
+
this.selectionChangeTarget_ = /** @type {Node} */ (e.target);
|
2030
|
+
this.selectionChangeTimer_.start();
|
2031
|
+
}
|
2032
|
+
};
|
2033
|
+
|
2034
|
+
|
2035
|
+
/**
|
2036
|
+
* Retrieve the HTML contents of a field.
|
2037
|
+
*
|
2038
|
+
* Do NOT just get the innerHTML of a field directly--there's a lot of
|
2039
|
+
* processing that needs to happen.
|
2040
|
+
* @return {string} The scrubbed contents of the field.
|
2041
|
+
*/
|
2042
|
+
goog.editor.Field.prototype.getCleanContents = function() {
|
2043
|
+
if (this.queryCommandValue(goog.editor.Command.USING_LOREM)) {
|
2044
|
+
return goog.string.Unicode.NBSP;
|
2045
|
+
}
|
2046
|
+
|
2047
|
+
if (!this.isLoaded()) {
|
2048
|
+
// The field is uneditable, so it's ok to read contents directly.
|
2049
|
+
var elem = this.getOriginalElement();
|
2050
|
+
if (!elem) {
|
2051
|
+
goog.log.log(this.logger, goog.log.Level.SHOUT,
|
2052
|
+
"Couldn't get the field element to read the contents");
|
2053
|
+
}
|
2054
|
+
return elem.innerHTML;
|
2055
|
+
}
|
2056
|
+
|
2057
|
+
var fieldCopy = this.getFieldCopy();
|
2058
|
+
|
2059
|
+
// Allow the plugins to handle their cleanup.
|
2060
|
+
this.invokeOp_(goog.editor.Plugin.Op.CLEAN_CONTENTS_DOM, fieldCopy);
|
2061
|
+
return this.reduceOp_(
|
2062
|
+
goog.editor.Plugin.Op.CLEAN_CONTENTS_HTML, fieldCopy.innerHTML);
|
2063
|
+
};
|
2064
|
+
|
2065
|
+
|
2066
|
+
/**
|
2067
|
+
* Get the copy of the editable field element, which has the innerHTML set
|
2068
|
+
* correctly.
|
2069
|
+
* @return {Element} The copy of the editable field.
|
2070
|
+
* @protected
|
2071
|
+
*/
|
2072
|
+
goog.editor.Field.prototype.getFieldCopy = function() {
|
2073
|
+
var field = this.getElement();
|
2074
|
+
// Deep cloneNode strips some script tag contents in IE, so we do this.
|
2075
|
+
var fieldCopy = /** @type {Element} */(field.cloneNode(false));
|
2076
|
+
|
2077
|
+
// For some reason, when IE sets innerHtml of the cloned node, it strips
|
2078
|
+
// script tags that fall at the beginning of an element. Appending a
|
2079
|
+
// non-breaking space prevents this.
|
2080
|
+
var html = field.innerHTML;
|
2081
|
+
if (goog.userAgent.IE && html.match(/^\s*<script/i)) {
|
2082
|
+
html = goog.string.Unicode.NBSP + html;
|
2083
|
+
}
|
2084
|
+
fieldCopy.innerHTML = html;
|
2085
|
+
return fieldCopy;
|
2086
|
+
};
|
2087
|
+
|
2088
|
+
|
2089
|
+
/**
|
2090
|
+
* Sets the contents of the field.
|
2091
|
+
* @param {boolean} addParas Boolean to specify whether to add paragraphs
|
2092
|
+
* to long fields.
|
2093
|
+
* @param {?string} html html to insert. If html=null, then this defaults
|
2094
|
+
* to a nsbp for mozilla and an empty string for IE.
|
2095
|
+
* @param {boolean=} opt_dontFireDelayedChange True to make this content change
|
2096
|
+
* not fire a delayed change event.
|
2097
|
+
* @param {boolean=} opt_applyLorem Whether to apply lorem ipsum styles.
|
2098
|
+
*/
|
2099
|
+
goog.editor.Field.prototype.setHtml = function(
|
2100
|
+
addParas, html, opt_dontFireDelayedChange, opt_applyLorem) {
|
2101
|
+
if (this.isLoading()) {
|
2102
|
+
goog.log.error(this.logger, "Can't set html while loading Trogedit");
|
2103
|
+
return;
|
2104
|
+
}
|
2105
|
+
|
2106
|
+
// Clear the lorem ipsum style, always.
|
2107
|
+
if (opt_applyLorem) {
|
2108
|
+
this.execCommand(goog.editor.Command.CLEAR_LOREM);
|
2109
|
+
}
|
2110
|
+
|
2111
|
+
if (html && addParas) {
|
2112
|
+
html = '<p>' + html + '</p>';
|
2113
|
+
}
|
2114
|
+
|
2115
|
+
// If we don't want change events to fire, we have to turn off change events
|
2116
|
+
// before setting the field contents, since that causes mutation events.
|
2117
|
+
if (opt_dontFireDelayedChange) {
|
2118
|
+
this.stopChangeEvents(false, true);
|
2119
|
+
}
|
2120
|
+
|
2121
|
+
this.setInnerHtml_(html);
|
2122
|
+
|
2123
|
+
// Set the lorem ipsum style, if the element is empty.
|
2124
|
+
if (opt_applyLorem) {
|
2125
|
+
this.execCommand(goog.editor.Command.UPDATE_LOREM);
|
2126
|
+
}
|
2127
|
+
|
2128
|
+
// TODO(user): This check should probably be moved to isEventStopped and
|
2129
|
+
// startEvent.
|
2130
|
+
if (this.isLoaded()) {
|
2131
|
+
if (opt_dontFireDelayedChange) { // Turn back on change events
|
2132
|
+
// We must fire change timer if necessary before restarting change events!
|
2133
|
+
// Otherwise, the change timer firing after we restart events will cause
|
2134
|
+
// the delayed change we were trying to stop. Flow:
|
2135
|
+
// Stop delayed change
|
2136
|
+
// setInnerHtml_, this starts the change timer
|
2137
|
+
// start delayed change
|
2138
|
+
// change timer fires
|
2139
|
+
// starts delayed change timer since event was not stopped
|
2140
|
+
// delayed change fires for the delayed change we tried to stop.
|
2141
|
+
if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
|
2142
|
+
this.changeTimerGecko_.fireIfActive();
|
2143
|
+
}
|
2144
|
+
this.startChangeEvents();
|
2145
|
+
} else { // Mark the document as changed and fire change events.
|
2146
|
+
this.dispatchChange();
|
2147
|
+
}
|
2148
|
+
}
|
2149
|
+
};
|
2150
|
+
|
2151
|
+
|
2152
|
+
/**
|
2153
|
+
* Sets the inner HTML of the field. Works on both editable and
|
2154
|
+
* uneditable fields.
|
2155
|
+
* @param {?string} html The new inner HTML of the field.
|
2156
|
+
* @private
|
2157
|
+
*/
|
2158
|
+
goog.editor.Field.prototype.setInnerHtml_ = function(html) {
|
2159
|
+
var field = this.getElement();
|
2160
|
+
if (field) {
|
2161
|
+
// Safari will put <style> tags into *new* <head> elements. When setting
|
2162
|
+
// HTML, we need to remove these spare <head>s to make sure there's a
|
2163
|
+
// clean slate, but keep the first <head>.
|
2164
|
+
// Note: We punt on this issue for the non iframe case since
|
2165
|
+
// we don't want to screw with the main document.
|
2166
|
+
if (this.usesIframe() && goog.editor.BrowserFeature.MOVES_STYLE_TO_HEAD) {
|
2167
|
+
var heads = field.ownerDocument.getElementsByTagName('HEAD');
|
2168
|
+
for (var i = heads.length - 1; i >= 1; --i) {
|
2169
|
+
heads[i].parentNode.removeChild(heads[i]);
|
2170
|
+
}
|
2171
|
+
}
|
2172
|
+
} else {
|
2173
|
+
field = this.getOriginalElement();
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
if (field) {
|
2177
|
+
this.injectContents(html, field);
|
2178
|
+
}
|
2179
|
+
};
|
2180
|
+
|
2181
|
+
|
2182
|
+
/**
|
2183
|
+
* Attemps to turn on designMode for a document. This function can fail under
|
2184
|
+
* certain circumstances related to the load event, and will throw an exception.
|
2185
|
+
* @protected
|
2186
|
+
*/
|
2187
|
+
goog.editor.Field.prototype.turnOnDesignModeGecko = function() {
|
2188
|
+
var doc = this.getEditableDomHelper().getDocument();
|
2189
|
+
|
2190
|
+
// NOTE(nicksantos): This will fail under certain conditions, like
|
2191
|
+
// when the node has display: none. It's up to clients to ensure that
|
2192
|
+
// their fields are valid when they try to make them editable.
|
2193
|
+
doc.designMode = 'on';
|
2194
|
+
|
2195
|
+
if (goog.editor.BrowserFeature.HAS_STYLE_WITH_CSS) {
|
2196
|
+
doc.execCommand('styleWithCSS', false, false);
|
2197
|
+
}
|
2198
|
+
};
|
2199
|
+
|
2200
|
+
|
2201
|
+
/**
|
2202
|
+
* Installs styles if needed. Only writes styles when they can't be written
|
2203
|
+
* inline directly into the field.
|
2204
|
+
* @protected
|
2205
|
+
*/
|
2206
|
+
goog.editor.Field.prototype.installStyles = function() {
|
2207
|
+
if (this.cssStyles && this.shouldLoadAsynchronously()) {
|
2208
|
+
goog.style.installStyles(this.cssStyles, this.getElement());
|
2209
|
+
}
|
2210
|
+
};
|
2211
|
+
|
2212
|
+
|
2213
|
+
/**
|
2214
|
+
* Signal that the field is loaded and ready to use. Change events now are
|
2215
|
+
* in effect.
|
2216
|
+
* @private
|
2217
|
+
*/
|
2218
|
+
goog.editor.Field.prototype.dispatchLoadEvent_ = function() {
|
2219
|
+
var field = this.getElement();
|
2220
|
+
|
2221
|
+
this.installStyles();
|
2222
|
+
this.startChangeEvents();
|
2223
|
+
goog.log.info(this.logger, 'Dispatching load ' + this.id);
|
2224
|
+
this.dispatchEvent(goog.editor.Field.EventType.LOAD);
|
2225
|
+
};
|
2226
|
+
|
2227
|
+
|
2228
|
+
/**
|
2229
|
+
* @return {boolean} Whether the field is uneditable.
|
2230
|
+
*/
|
2231
|
+
goog.editor.Field.prototype.isUneditable = function() {
|
2232
|
+
return this.loadState_ == goog.editor.Field.LoadState_.UNEDITABLE;
|
2233
|
+
};
|
2234
|
+
|
2235
|
+
|
2236
|
+
/**
|
2237
|
+
* @return {boolean} Whether the field has finished loading.
|
2238
|
+
*/
|
2239
|
+
goog.editor.Field.prototype.isLoaded = function() {
|
2240
|
+
return this.loadState_ == goog.editor.Field.LoadState_.EDITABLE;
|
2241
|
+
};
|
2242
|
+
|
2243
|
+
|
2244
|
+
/**
|
2245
|
+
* @return {boolean} Whether the field is in the process of loading.
|
2246
|
+
*/
|
2247
|
+
goog.editor.Field.prototype.isLoading = function() {
|
2248
|
+
return this.loadState_ == goog.editor.Field.LoadState_.LOADING;
|
2249
|
+
};
|
2250
|
+
|
2251
|
+
|
2252
|
+
/**
|
2253
|
+
* Gives the field focus.
|
2254
|
+
*/
|
2255
|
+
goog.editor.Field.prototype.focus = function() {
|
2256
|
+
if (!goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE &&
|
2257
|
+
this.usesIframe()) {
|
2258
|
+
// In designMode, only the window itself can be focused; not the element.
|
2259
|
+
this.getEditableDomHelper().getWindow().focus();
|
2260
|
+
} else {
|
2261
|
+
if (goog.userAgent.OPERA) {
|
2262
|
+
// Opera will scroll to the bottom of the focused document, even
|
2263
|
+
// if it is contained in an iframe that is scrolled to the top and
|
2264
|
+
// the bottom flows past the end of it. To prevent this,
|
2265
|
+
// save the scroll position of the document containing the editor
|
2266
|
+
// iframe, then restore it after the focus.
|
2267
|
+
var scrollX = this.appWindow_.pageXOffset;
|
2268
|
+
var scrollY = this.appWindow_.pageYOffset;
|
2269
|
+
}
|
2270
|
+
this.getElement().focus();
|
2271
|
+
if (goog.userAgent.OPERA) {
|
2272
|
+
this.appWindow_.scrollTo(
|
2273
|
+
/** @type {number} */ (scrollX), /** @type {number} */ (scrollY));
|
2274
|
+
}
|
2275
|
+
}
|
2276
|
+
};
|
2277
|
+
|
2278
|
+
|
2279
|
+
/**
|
2280
|
+
* Gives the field focus and places the cursor at the start of the field.
|
2281
|
+
*/
|
2282
|
+
goog.editor.Field.prototype.focusAndPlaceCursorAtStart = function() {
|
2283
|
+
// NOTE(user): Excluding Gecko to maintain existing behavior post refactoring
|
2284
|
+
// placeCursorAtStart into its own method. In Gecko browsers that currently
|
2285
|
+
// have a selection the existing selection will be restored, otherwise it
|
2286
|
+
// will go to the start.
|
2287
|
+
// TODO(user): Refactor the code using this and related methods. We should
|
2288
|
+
// only mess with the selection in the case where there is not an existing
|
2289
|
+
// selection in the field.
|
2290
|
+
if (goog.editor.BrowserFeature.HAS_IE_RANGES || goog.userAgent.WEBKIT) {
|
2291
|
+
this.placeCursorAtStart();
|
2292
|
+
}
|
2293
|
+
this.focus();
|
2294
|
+
};
|
2295
|
+
|
2296
|
+
|
2297
|
+
/**
|
2298
|
+
* Place the cursor at the start of this field. It's recommended that you only
|
2299
|
+
* use this method (and manipulate the selection in general) when there is not
|
2300
|
+
* an existing selection in the field.
|
2301
|
+
*/
|
2302
|
+
goog.editor.Field.prototype.placeCursorAtStart = function() {
|
2303
|
+
this.placeCursorAtStartOrEnd_(true);
|
2304
|
+
};
|
2305
|
+
|
2306
|
+
|
2307
|
+
/**
|
2308
|
+
* Place the cursor at the start of this field. It's recommended that you only
|
2309
|
+
* use this method (and manipulate the selection in general) when there is not
|
2310
|
+
* an existing selection in the field.
|
2311
|
+
*/
|
2312
|
+
goog.editor.Field.prototype.placeCursorAtEnd = function() {
|
2313
|
+
this.placeCursorAtStartOrEnd_(false);
|
2314
|
+
};
|
2315
|
+
|
2316
|
+
|
2317
|
+
/**
|
2318
|
+
* Helper method to place the cursor at the start or end of this field.
|
2319
|
+
* @param {boolean} isStart True for start, false for end.
|
2320
|
+
* @private
|
2321
|
+
*/
|
2322
|
+
goog.editor.Field.prototype.placeCursorAtStartOrEnd_ = function(isStart) {
|
2323
|
+
var field = this.getElement();
|
2324
|
+
if (field) {
|
2325
|
+
var cursorPosition = isStart ? goog.editor.node.getLeftMostLeaf(field) :
|
2326
|
+
goog.editor.node.getRightMostLeaf(field);
|
2327
|
+
if (field == cursorPosition) {
|
2328
|
+
// The rightmost leaf we found was the field element itself (which likely
|
2329
|
+
// means the field element is empty). We can't place the cursor next to
|
2330
|
+
// the field element, so just place it at the beginning.
|
2331
|
+
goog.dom.Range.createCaret(field, 0).select();
|
2332
|
+
} else {
|
2333
|
+
goog.editor.range.placeCursorNextTo(cursorPosition, isStart);
|
2334
|
+
}
|
2335
|
+
this.dispatchSelectionChangeEvent();
|
2336
|
+
}
|
2337
|
+
};
|
2338
|
+
|
2339
|
+
|
2340
|
+
/**
|
2341
|
+
* Restore a saved range, and set the focus on the field.
|
2342
|
+
* If no range is specified, we simply set the focus.
|
2343
|
+
* @param {goog.dom.SavedRange=} opt_range A previously saved selected range.
|
2344
|
+
*/
|
2345
|
+
goog.editor.Field.prototype.restoreSavedRange = function(opt_range) {
|
2346
|
+
if (goog.userAgent.IE) {
|
2347
|
+
this.focus();
|
2348
|
+
}
|
2349
|
+
if (opt_range) {
|
2350
|
+
opt_range.restore();
|
2351
|
+
}
|
2352
|
+
if (!goog.userAgent.IE) {
|
2353
|
+
this.focus();
|
2354
|
+
}
|
2355
|
+
};
|
2356
|
+
|
2357
|
+
|
2358
|
+
/**
|
2359
|
+
* Makes a field editable.
|
2360
|
+
*
|
2361
|
+
* @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
|
2362
|
+
*/
|
2363
|
+
goog.editor.Field.prototype.makeEditable = function(opt_iframeSrc) {
|
2364
|
+
this.loadState_ = goog.editor.Field.LoadState_.LOADING;
|
2365
|
+
|
2366
|
+
var field = this.getOriginalElement();
|
2367
|
+
|
2368
|
+
// TODO: In the fieldObj, save the field's id, className, cssText
|
2369
|
+
// in order to reset it on closeField. That way, we can muck with the field's
|
2370
|
+
// css, id, class and restore to how it was at the end.
|
2371
|
+
this.nodeName = field.nodeName;
|
2372
|
+
this.savedClassName_ = field.className;
|
2373
|
+
this.setInitialStyle(field.style.cssText);
|
2374
|
+
|
2375
|
+
field.className += ' editable';
|
2376
|
+
|
2377
|
+
this.makeEditableInternal(opt_iframeSrc);
|
2378
|
+
};
|
2379
|
+
|
2380
|
+
|
2381
|
+
/**
|
2382
|
+
* Handles actually making something editable - creating necessary nodes,
|
2383
|
+
* injecting content, etc.
|
2384
|
+
* @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
|
2385
|
+
* @protected
|
2386
|
+
*/
|
2387
|
+
goog.editor.Field.prototype.makeEditableInternal = function(opt_iframeSrc) {
|
2388
|
+
this.makeIframeField_(opt_iframeSrc);
|
2389
|
+
};
|
2390
|
+
|
2391
|
+
|
2392
|
+
/**
|
2393
|
+
* Handle the loading of the field (e.g. once the field is ready to setup).
|
2394
|
+
* TODO(user): this should probably just be moved into dispatchLoadEvent_.
|
2395
|
+
* @protected
|
2396
|
+
*/
|
2397
|
+
goog.editor.Field.prototype.handleFieldLoad = function() {
|
2398
|
+
if (goog.userAgent.IE) {
|
2399
|
+
// This sometimes fails if the selection is invalid. This can happen, for
|
2400
|
+
// example, if you attach a CLICK handler to the field that causes the
|
2401
|
+
// field to be removed from the DOM and replaced with an editor
|
2402
|
+
// -- however, listening to another event like MOUSEDOWN does not have this
|
2403
|
+
// issue since no mouse selection has happened at that time.
|
2404
|
+
goog.dom.Range.clearSelection(this.editableDomHelper.getWindow());
|
2405
|
+
}
|
2406
|
+
|
2407
|
+
if (goog.editor.Field.getActiveFieldId() != this.id) {
|
2408
|
+
this.execCommand(goog.editor.Command.UPDATE_LOREM);
|
2409
|
+
}
|
2410
|
+
|
2411
|
+
this.setupChangeListeners_();
|
2412
|
+
this.dispatchLoadEvent_();
|
2413
|
+
|
2414
|
+
// Enabling plugins after we fire the load event so that clients have a
|
2415
|
+
// chance to set initial field contents before we start mucking with
|
2416
|
+
// everything.
|
2417
|
+
for (var classId in this.plugins_) {
|
2418
|
+
this.plugins_[classId].enable(this);
|
2419
|
+
}
|
2420
|
+
};
|
2421
|
+
|
2422
|
+
|
2423
|
+
/**
|
2424
|
+
* Closes the field and cancels all pending change timers. Note that this
|
2425
|
+
* means that if a change event has not fired yet, it will not fire. Clients
|
2426
|
+
* should check fieldOj.isModified() if they depend on the final change event.
|
2427
|
+
* Throws an error if the field is already uneditable.
|
2428
|
+
*
|
2429
|
+
* @param {boolean=} opt_skipRestore True to prevent copying of editable field
|
2430
|
+
* contents back into the original node.
|
2431
|
+
*/
|
2432
|
+
goog.editor.Field.prototype.makeUneditable = function(opt_skipRestore) {
|
2433
|
+
if (this.isUneditable()) {
|
2434
|
+
throw Error('makeUneditable: Field is already uneditable');
|
2435
|
+
}
|
2436
|
+
|
2437
|
+
// Fire any events waiting on a timeout.
|
2438
|
+
// Clearing delayed change also clears changeTimerGecko_.
|
2439
|
+
this.clearDelayedChange();
|
2440
|
+
this.selectionChangeTimer_.fireIfActive();
|
2441
|
+
this.execCommand(goog.editor.Command.CLEAR_LOREM);
|
2442
|
+
|
2443
|
+
var html = null;
|
2444
|
+
if (!opt_skipRestore && this.getElement()) {
|
2445
|
+
// Rest of cleanup is simpler if field was never initialized.
|
2446
|
+
html = this.getCleanContents();
|
2447
|
+
}
|
2448
|
+
|
2449
|
+
// First clean up anything that happens in makeFieldEditable
|
2450
|
+
// (i.e. anything that needs cleanup even if field has not loaded).
|
2451
|
+
this.clearFieldLoadListener_();
|
2452
|
+
|
2453
|
+
var field = this.getOriginalElement();
|
2454
|
+
if (goog.editor.Field.getActiveFieldId() == field.id) {
|
2455
|
+
goog.editor.Field.setActiveFieldId(null);
|
2456
|
+
}
|
2457
|
+
|
2458
|
+
// Clear all listeners before removing the nodes from the dom - if
|
2459
|
+
// there are listeners on the iframe window, Firefox throws errors trying
|
2460
|
+
// to unlisten once the iframe is no longer in the dom.
|
2461
|
+
this.clearListeners();
|
2462
|
+
|
2463
|
+
// For fields that have loaded, clean up anything that happened in
|
2464
|
+
// handleFieldOpen or later.
|
2465
|
+
// If html is provided, copy it back and reset the properties on the field
|
2466
|
+
// so that the original node will have the same properties as it did before
|
2467
|
+
// it was made editable.
|
2468
|
+
if (goog.isString(html)) {
|
2469
|
+
goog.editor.node.replaceInnerHtml(field, html);
|
2470
|
+
this.resetOriginalElemProperties();
|
2471
|
+
}
|
2472
|
+
|
2473
|
+
this.restoreDom();
|
2474
|
+
this.tearDownFieldObject_();
|
2475
|
+
|
2476
|
+
// On Safari, make sure to un-focus the field so that the
|
2477
|
+
// native "current field" highlight style gets removed.
|
2478
|
+
if (goog.userAgent.WEBKIT) {
|
2479
|
+
field.blur();
|
2480
|
+
}
|
2481
|
+
|
2482
|
+
this.execCommand(goog.editor.Command.UPDATE_LOREM);
|
2483
|
+
this.dispatchEvent(goog.editor.Field.EventType.UNLOAD);
|
2484
|
+
};
|
2485
|
+
|
2486
|
+
|
2487
|
+
/**
|
2488
|
+
* Restores the dom to how it was before being made editable.
|
2489
|
+
* @protected
|
2490
|
+
*/
|
2491
|
+
goog.editor.Field.prototype.restoreDom = function() {
|
2492
|
+
// TODO(user): Consider only removing the iframe if we are
|
2493
|
+
// restoring the original node, aka, if opt_html.
|
2494
|
+
var field = this.getOriginalElement();
|
2495
|
+
// TODO(robbyw): Consider throwing an error if !field.
|
2496
|
+
if (field) {
|
2497
|
+
// If the field is in the process of loading when it starts getting torn
|
2498
|
+
// up, the iframe will not exist.
|
2499
|
+
var iframe = this.getEditableIframe();
|
2500
|
+
if (iframe) {
|
2501
|
+
goog.dom.replaceNode(field, iframe);
|
2502
|
+
}
|
2503
|
+
}
|
2504
|
+
};
|
2505
|
+
|
2506
|
+
|
2507
|
+
/**
|
2508
|
+
* Returns true if the field needs to be loaded asynchrnously.
|
2509
|
+
* @return {boolean} True if loads are async.
|
2510
|
+
* @protected
|
2511
|
+
*/
|
2512
|
+
goog.editor.Field.prototype.shouldLoadAsynchronously = function() {
|
2513
|
+
if (!goog.isDef(this.isHttps_)) {
|
2514
|
+
this.isHttps_ = false;
|
2515
|
+
|
2516
|
+
if (goog.userAgent.IE && this.usesIframe()) {
|
2517
|
+
// IE iframes need to load asynchronously if they are in https as we need
|
2518
|
+
// to set an actual src on the iframe and wait for it to load.
|
2519
|
+
|
2520
|
+
// Find the top-most window we have access to and see if it's https.
|
2521
|
+
// Technically this could fail if we have an http frame in an https frame
|
2522
|
+
// on the same domain (or vice versa), but walking up the window heirarchy
|
2523
|
+
// to find the first window that has an http* protocol seems like
|
2524
|
+
// overkill.
|
2525
|
+
var win = this.originalDomHelper.getWindow();
|
2526
|
+
while (win != win.parent) {
|
2527
|
+
try {
|
2528
|
+
win = win.parent;
|
2529
|
+
} catch (e) {
|
2530
|
+
break;
|
2531
|
+
}
|
2532
|
+
}
|
2533
|
+
var loc = win.location;
|
2534
|
+
this.isHttps_ = loc.protocol == 'https:' &&
|
2535
|
+
loc.search.indexOf('nocheckhttps') == -1;
|
2536
|
+
}
|
2537
|
+
}
|
2538
|
+
return this.isHttps_;
|
2539
|
+
};
|
2540
|
+
|
2541
|
+
|
2542
|
+
/**
|
2543
|
+
* Start the editable iframe creation process for Mozilla or IE whitebox.
|
2544
|
+
* The iframes load asynchronously.
|
2545
|
+
*
|
2546
|
+
* @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
|
2547
|
+
* @private
|
2548
|
+
*/
|
2549
|
+
goog.editor.Field.prototype.makeIframeField_ = function(opt_iframeSrc) {
|
2550
|
+
var field = this.getOriginalElement();
|
2551
|
+
// TODO(robbyw): Consider throwing an error if !field.
|
2552
|
+
if (field) {
|
2553
|
+
var html = field.innerHTML;
|
2554
|
+
|
2555
|
+
// Invoke prepareContentsHtml on all plugins to prepare html for editing.
|
2556
|
+
// Make sure this is done before calling this.attachFrame which removes the
|
2557
|
+
// original element from DOM tree. Plugins may assume that the original
|
2558
|
+
// element is still in its original position in DOM.
|
2559
|
+
var styles = {};
|
2560
|
+
html = this.reduceOp_(goog.editor.Plugin.Op.PREPARE_CONTENTS_HTML,
|
2561
|
+
html, styles);
|
2562
|
+
|
2563
|
+
var iframe = /** @type {HTMLIFrameElement} */(
|
2564
|
+
this.originalDomHelper.createDom(goog.dom.TagName.IFRAME,
|
2565
|
+
this.getIframeAttributes()));
|
2566
|
+
|
2567
|
+
// TODO(nicksantos): Figure out if this is ever needed in SAFARI?
|
2568
|
+
// In IE over HTTPS we need to wait for a load event before we set up the
|
2569
|
+
// iframe, this is to prevent a security prompt or access is denied
|
2570
|
+
// errors.
|
2571
|
+
// NOTE(user): This hasn't been confirmed. isHttps_ allows a query
|
2572
|
+
// param, nocheckhttps, which we can use to ascertain if this is actually
|
2573
|
+
// needed. It was originally thought to be needed for IE6 SP1, but
|
2574
|
+
// errors have been seen in IE7 as well.
|
2575
|
+
if (this.shouldLoadAsynchronously()) {
|
2576
|
+
// onLoad is the function to call once the iframe is ready to continue
|
2577
|
+
// loading.
|
2578
|
+
var onLoad = goog.bind(this.iframeFieldLoadHandler, this, iframe,
|
2579
|
+
html, styles);
|
2580
|
+
|
2581
|
+
this.fieldLoadListenerKey_ = goog.events.listen(iframe,
|
2582
|
+
goog.events.EventType.LOAD, onLoad, true);
|
2583
|
+
|
2584
|
+
if (opt_iframeSrc) {
|
2585
|
+
iframe.src = opt_iframeSrc;
|
2586
|
+
}
|
2587
|
+
}
|
2588
|
+
|
2589
|
+
this.attachIframe(iframe);
|
2590
|
+
|
2591
|
+
// Only continue if its not IE HTTPS in which case we're waiting for load.
|
2592
|
+
if (!this.shouldLoadAsynchronously()) {
|
2593
|
+
this.iframeFieldLoadHandler(iframe, html, styles);
|
2594
|
+
}
|
2595
|
+
}
|
2596
|
+
};
|
2597
|
+
|
2598
|
+
|
2599
|
+
/**
|
2600
|
+
* Given the original field element, and the iframe that is destined to
|
2601
|
+
* become the editable field, styles them appropriately and add the iframe
|
2602
|
+
* to the dom.
|
2603
|
+
*
|
2604
|
+
* @param {HTMLIFrameElement} iframe The iframe element.
|
2605
|
+
* @protected
|
2606
|
+
*/
|
2607
|
+
goog.editor.Field.prototype.attachIframe = function(iframe) {
|
2608
|
+
var field = this.getOriginalElement();
|
2609
|
+
// TODO(user): Why do we do these two lines .. and why whitebox only?
|
2610
|
+
iframe.className = field.className;
|
2611
|
+
iframe.id = field.id;
|
2612
|
+
goog.dom.replaceNode(iframe, field);
|
2613
|
+
};
|
2614
|
+
|
2615
|
+
|
2616
|
+
/**
|
2617
|
+
* @param {Object} extraStyles A map of extra styles.
|
2618
|
+
* @return {goog.editor.icontent.FieldFormatInfo} The FieldFormatInfo object for
|
2619
|
+
* this field's configuration.
|
2620
|
+
* @protected
|
2621
|
+
*/
|
2622
|
+
goog.editor.Field.prototype.getFieldFormatInfo = function(extraStyles) {
|
2623
|
+
var originalElement = this.getOriginalElement();
|
2624
|
+
var isStandardsMode = goog.editor.node.isStandardsMode(originalElement);
|
2625
|
+
|
2626
|
+
return new goog.editor.icontent.FieldFormatInfo(
|
2627
|
+
this.id,
|
2628
|
+
isStandardsMode,
|
2629
|
+
false,
|
2630
|
+
false,
|
2631
|
+
extraStyles);
|
2632
|
+
};
|
2633
|
+
|
2634
|
+
|
2635
|
+
/**
|
2636
|
+
* Writes the html content into the iframe. Handles writing any aditional
|
2637
|
+
* styling as well.
|
2638
|
+
* @param {HTMLIFrameElement} iframe Iframe to write contents into.
|
2639
|
+
* @param {string} innerHtml The html content to write into the iframe.
|
2640
|
+
* @param {Object} extraStyles A map of extra style attributes.
|
2641
|
+
* @protected
|
2642
|
+
*/
|
2643
|
+
goog.editor.Field.prototype.writeIframeContent = function(
|
2644
|
+
iframe, innerHtml, extraStyles) {
|
2645
|
+
var formatInfo = this.getFieldFormatInfo(extraStyles);
|
2646
|
+
|
2647
|
+
if (this.shouldLoadAsynchronously()) {
|
2648
|
+
var doc = goog.dom.getFrameContentDocument(iframe);
|
2649
|
+
goog.editor.icontent.writeHttpsInitialIframe(formatInfo, doc, innerHtml);
|
2650
|
+
} else {
|
2651
|
+
var styleInfo = new goog.editor.icontent.FieldStyleInfo(
|
2652
|
+
this.getElement(), this.cssStyles);
|
2653
|
+
goog.editor.icontent.writeNormalInitialIframe(formatInfo, innerHtml,
|
2654
|
+
styleInfo, iframe);
|
2655
|
+
}
|
2656
|
+
};
|
2657
|
+
|
2658
|
+
|
2659
|
+
/**
|
2660
|
+
* The function to call when the editable iframe loads.
|
2661
|
+
*
|
2662
|
+
* @param {HTMLIFrameElement} iframe Iframe that just loaded.
|
2663
|
+
* @param {string} innerHtml Html to put inside the body of the iframe.
|
2664
|
+
* @param {Object} styles Property-value map of CSS styles to install on
|
2665
|
+
* editable field.
|
2666
|
+
* @protected
|
2667
|
+
*/
|
2668
|
+
goog.editor.Field.prototype.iframeFieldLoadHandler = function(iframe,
|
2669
|
+
innerHtml, styles) {
|
2670
|
+
this.clearFieldLoadListener_();
|
2671
|
+
|
2672
|
+
iframe.allowTransparency = 'true';
|
2673
|
+
this.writeIframeContent(iframe, innerHtml, styles);
|
2674
|
+
var doc = goog.dom.getFrameContentDocument(iframe);
|
2675
|
+
|
2676
|
+
// Make sure to get this pointer after the doc.write as the doc.write
|
2677
|
+
// clobbers all the document contents.
|
2678
|
+
var body = doc.body;
|
2679
|
+
this.setupFieldObject(body);
|
2680
|
+
|
2681
|
+
if (!goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE &&
|
2682
|
+
this.usesIframe()) {
|
2683
|
+
this.turnOnDesignModeGecko();
|
2684
|
+
}
|
2685
|
+
|
2686
|
+
this.handleFieldLoad();
|
2687
|
+
};
|
2688
|
+
|
2689
|
+
|
2690
|
+
/**
|
2691
|
+
* Clears fieldLoadListener for a field. Must be called even (especially?) if
|
2692
|
+
* the field is not yet loaded and therefore not in this.fieldMap_
|
2693
|
+
* @private
|
2694
|
+
*/
|
2695
|
+
goog.editor.Field.prototype.clearFieldLoadListener_ = function() {
|
2696
|
+
if (this.fieldLoadListenerKey_) {
|
2697
|
+
goog.events.unlistenByKey(this.fieldLoadListenerKey_);
|
2698
|
+
this.fieldLoadListenerKey_ = null;
|
2699
|
+
}
|
2700
|
+
};
|
2701
|
+
|
2702
|
+
|
2703
|
+
/**
|
2704
|
+
* @return {Object} Get the HTML attributes for this field's iframe.
|
2705
|
+
* @protected
|
2706
|
+
*/
|
2707
|
+
goog.editor.Field.prototype.getIframeAttributes = function() {
|
2708
|
+
var iframeStyle = 'padding:0;' + this.getOriginalElement().style.cssText;
|
2709
|
+
|
2710
|
+
if (!goog.string.endsWith(iframeStyle, ';')) {
|
2711
|
+
iframeStyle += ';';
|
2712
|
+
}
|
2713
|
+
|
2714
|
+
iframeStyle += 'background-color:white;';
|
2715
|
+
|
2716
|
+
// Ensure that the iframe has default overflow styling. If overflow is
|
2717
|
+
// set to auto, an IE rendering bug can occur when it tries to render a
|
2718
|
+
// table at the very bottom of the field, such that the table would cause
|
2719
|
+
// a scrollbar, that makes the entire field go blank.
|
2720
|
+
if (goog.userAgent.IE) {
|
2721
|
+
iframeStyle += 'overflow:visible;';
|
2722
|
+
}
|
2723
|
+
|
2724
|
+
return { 'frameBorder': 0, 'style': iframeStyle };
|
2725
|
+
};
|