closure 1.1.692
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/.yardopts +3 -0
- data/LICENSE +202 -0
- data/README.md +26 -0
- data/beanshell/LICENSE +12 -0
- data/beanshell/bsh-core-2.0b4.jar +0 -0
- data/closure-compiler/COPYING +202 -0
- data/closure-compiler/README +278 -0
- data/closure-compiler/compiler.jar +0 -0
- data/closure-library/AUTHORS +12 -0
- data/closure-library/LICENSE +176 -0
- data/closure-library/README +6 -0
- data/closure-library/all_tests.html +113 -0
- data/closure-library/alltests.js +16 -0
- data/closure-library/closure/bin/build/closurebuilder.py +257 -0
- data/closure-library/closure/bin/build/depstree.py +186 -0
- data/closure-library/closure/bin/build/depstree_test.py +127 -0
- data/closure-library/closure/bin/build/depswriter.py +197 -0
- data/closure-library/closure/bin/build/jscompiler.py +69 -0
- data/closure-library/closure/bin/build/source.py +86 -0
- data/closure-library/closure/bin/build/source_test.py +57 -0
- data/closure-library/closure/bin/build/treescan.py +78 -0
- data/closure-library/closure/bin/calcdeps.py +570 -0
- data/closure-library/closure/bin/scopify.py +211 -0
- data/closure-library/closure/css/inlay/g-base.css +82 -0
- data/closure-library/closure/css/inlay/g-fixed.css +158 -0
- data/closure-library/closure/css/inlay/g-ratio.css +253 -0
- data/closure-library/closure/goog/array/array.js +1300 -0
- data/closure-library/closure/goog/array/array_test.html +1524 -0
- data/closure-library/closure/goog/asserts/asserts.js +277 -0
- data/closure-library/closure/goog/asserts/asserts_test.html +163 -0
- data/closure-library/closure/goog/async/conditionaldelay.js +238 -0
- data/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
- data/closure-library/closure/goog/async/delay.js +174 -0
- data/closure-library/closure/goog/async/delay_test.html +148 -0
- data/closure-library/closure/goog/async/throttle.js +189 -0
- data/closure-library/closure/goog/async/throttle_test.html +102 -0
- data/closure-library/closure/goog/base.js +1471 -0
- data/closure-library/closure/goog/base_test.html +1166 -0
- data/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
- data/closure-library/closure/goog/color/alpha.js +436 -0
- data/closure-library/closure/goog/color/alpha_test.html +234 -0
- data/closure-library/closure/goog/color/color.js +757 -0
- data/closure-library/closure/goog/color/color_test.html +645 -0
- data/closure-library/closure/goog/color/names.js +176 -0
- data/closure-library/closure/goog/crypt/arc4.js +141 -0
- data/closure-library/closure/goog/crypt/arc4_test.html +42 -0
- data/closure-library/closure/goog/crypt/base64.js +267 -0
- data/closure-library/closure/goog/crypt/base64_test.html +106 -0
- data/closure-library/closure/goog/crypt/basen.js +242 -0
- data/closure-library/closure/goog/crypt/basen_test.html +167 -0
- data/closure-library/closure/goog/crypt/crypt.js +103 -0
- data/closure-library/closure/goog/crypt/crypt_test.html +68 -0
- data/closure-library/closure/goog/crypt/hash32.js +184 -0
- data/closure-library/closure/goog/crypt/hash32_test.html +287 -0
- data/closure-library/closure/goog/crypt/sha1.js +238 -0
- data/closure-library/closure/goog/crypt/sha1_test.html +47 -0
- data/closure-library/closure/goog/css/autocomplete.css +43 -0
- data/closure-library/closure/goog/css/bubble.css +84 -0
- data/closure-library/closure/goog/css/button.css +38 -0
- data/closure-library/closure/goog/css/charpicker.css +201 -0
- data/closure-library/closure/goog/css/checkbox.css +38 -0
- data/closure-library/closure/goog/css/colormenubutton.css +25 -0
- data/closure-library/closure/goog/css/colorpalette.css +54 -0
- data/closure-library/closure/goog/css/colorpicker-simplegrid.css +50 -0
- data/closure-library/closure/goog/css/combobox.css +57 -0
- data/closure-library/closure/goog/css/common.css +41 -0
- data/closure-library/closure/goog/css/css3button.css +77 -0
- data/closure-library/closure/goog/css/css3menubutton.css +23 -0
- data/closure-library/closure/goog/css/custombutton.css +164 -0
- data/closure-library/closure/goog/css/datepicker.css +148 -0
- data/closure-library/closure/goog/css/dialog.css +72 -0
- data/closure-library/closure/goog/css/dimensionpicker.css +47 -0
- data/closure-library/closure/goog/css/dragdropdetector.css +48 -0
- data/closure-library/closure/goog/css/editor/bubble.css +73 -0
- data/closure-library/closure/goog/css/editor/dialog.css +66 -0
- data/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
- data/closure-library/closure/goog/css/editortoolbar.css +225 -0
- data/closure-library/closure/goog/css/filteredmenu.css +30 -0
- data/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
- data/closure-library/closure/goog/css/flatbutton.css +65 -0
- data/closure-library/closure/goog/css/flatmenubutton.css +63 -0
- data/closure-library/closure/goog/css/hovercard.css +51 -0
- data/closure-library/closure/goog/css/hsvapalette.css +231 -0
- data/closure-library/closure/goog/css/hsvpalette.css +179 -0
- data/closure-library/closure/goog/css/imagelessbutton.css +160 -0
- data/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
- data/closure-library/closure/goog/css/inputdatepicker.css +12 -0
- data/closure-library/closure/goog/css/linkbutton.css +26 -0
- data/closure-library/closure/goog/css/menu.css +27 -0
- data/closure-library/closure/goog/css/menubutton.css +169 -0
- data/closure-library/closure/goog/css/menuitem.css +96 -0
- data/closure-library/closure/goog/css/menuseparator.css +19 -0
- data/closure-library/closure/goog/css/multitestrunner.css +121 -0
- data/closure-library/closure/goog/css/offline.css +147 -0
- data/closure-library/closure/goog/css/palette.css +36 -0
- data/closure-library/closure/goog/css/popupdatepicker.css +17 -0
- data/closure-library/closure/goog/css/roundedpanel.css +29 -0
- data/closure-library/closure/goog/css/roundedtab.css +158 -0
- data/closure-library/closure/goog/css/submenu.css +28 -0
- data/closure-library/closure/goog/css/tab.css +91 -0
- data/closure-library/closure/goog/css/tabbar.css +52 -0
- data/closure-library/closure/goog/css/tablesorter.css +14 -0
- data/closure-library/closure/goog/css/toolbar.css +400 -0
- data/closure-library/closure/goog/css/tooltip.css +14 -0
- data/closure-library/closure/goog/css/tree.css +147 -0
- data/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
- data/closure-library/closure/goog/cssom/cssom.js +447 -0
- data/closure-library/closure/goog/cssom/cssom_test.html +343 -0
- data/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
- data/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
- data/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
- data/closure-library/closure/goog/cssom/iframe/style.js +1020 -0
- data/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
- data/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
- data/closure-library/closure/goog/datasource/datamanager.js +566 -0
- data/closure-library/closure/goog/datasource/datasource.js +646 -0
- data/closure-library/closure/goog/datasource/datasource_test.html +265 -0
- data/closure-library/closure/goog/datasource/expr.js +544 -0
- data/closure-library/closure/goog/datasource/expr_test.html +97 -0
- data/closure-library/closure/goog/datasource/fastdatanode.js +792 -0
- data/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
- data/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
- data/closure-library/closure/goog/datasource/jsondatasource.js +146 -0
- data/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +191 -0
- data/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
- data/closure-library/closure/goog/datasource/xmldatasource.js +407 -0
- data/closure-library/closure/goog/date/date.js +1642 -0
- data/closure-library/closure/goog/date/date_test.html +1293 -0
- data/closure-library/closure/goog/date/datelike.js +27 -0
- data/closure-library/closure/goog/date/daterange.js +398 -0
- data/closure-library/closure/goog/date/daterange_test.html +213 -0
- data/closure-library/closure/goog/date/relative.js +425 -0
- data/closure-library/closure/goog/date/relative_test.html +124 -0
- data/closure-library/closure/goog/date/utcdatetime.js +178 -0
- data/closure-library/closure/goog/date/utcdatetime_test.html +119 -0
- data/closure-library/closure/goog/debug/console.js +138 -0
- data/closure-library/closure/goog/debug/debug.js +452 -0
- data/closure-library/closure/goog/debug/debug_test.html +32 -0
- data/closure-library/closure/goog/debug/debugwindow.js +582 -0
- data/closure-library/closure/goog/debug/devcss/devcss.js +435 -0
- data/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
- data/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
- data/closure-library/closure/goog/debug/divconsole.js +141 -0
- data/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
- data/closure-library/closure/goog/debug/entrypointregistry.js +111 -0
- data/closure-library/closure/goog/debug/entrypointregistry_test.html +63 -0
- data/closure-library/closure/goog/debug/error.js +47 -0
- data/closure-library/closure/goog/debug/error_test.html +85 -0
- data/closure-library/closure/goog/debug/errorhandler.js +234 -0
- data/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
- data/closure-library/closure/goog/debug/errorhandler_test.html +186 -0
- data/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
- data/closure-library/closure/goog/debug/errorreporter.js +324 -0
- data/closure-library/closure/goog/debug/errorreporter_test.html +289 -0
- data/closure-library/closure/goog/debug/fancywindow.js +265 -0
- data/closure-library/closure/goog/debug/formatter.js +314 -0
- data/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
- data/closure-library/closure/goog/debug/logbuffer.js +147 -0
- data/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
- data/closure-library/closure/goog/debug/logger.js +809 -0
- data/closure-library/closure/goog/debug/logger_test.html +208 -0
- data/closure-library/closure/goog/debug/logrecord.js +271 -0
- data/closure-library/closure/goog/debug/reflect.js +159 -0
- data/closure-library/closure/goog/debug/reflect_test.html +81 -0
- data/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
- data/closure-library/closure/goog/debug/tracer.js +750 -0
- data/closure-library/closure/goog/debug/tracer_test.html +57 -0
- data/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
- data/closure-library/closure/goog/demos/animationqueue.html +149 -0
- data/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
- data/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
- data/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
- data/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
- data/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
- data/closure-library/closure/goog/demos/bidiinput.html +72 -0
- data/closure-library/closure/goog/demos/bubble.html +250 -0
- data/closure-library/closure/goog/demos/button.html +395 -0
- data/closure-library/closure/goog/demos/charcounter.html +57 -0
- data/closure-library/closure/goog/demos/charpicker.html +64 -0
- data/closure-library/closure/goog/demos/checkbox.html +122 -0
- data/closure-library/closure/goog/demos/color-contrast.html +60 -0
- data/closure-library/closure/goog/demos/colormenubutton.html +213 -0
- data/closure-library/closure/goog/demos/colorpicker.html +43 -0
- data/closure-library/closure/goog/demos/combobox.html +125 -0
- data/closure-library/closure/goog/demos/container.html +670 -0
- data/closure-library/closure/goog/demos/control.html +477 -0
- data/closure-library/closure/goog/demos/css/demo.css +75 -0
- data/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
- data/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
- data/closure-library/closure/goog/demos/css3button.html +166 -0
- data/closure-library/closure/goog/demos/css3menubutton.html +285 -0
- data/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
- data/closure-library/closure/goog/demos/datepicker.html +183 -0
- data/closure-library/closure/goog/demos/debug.html +119 -0
- data/closure-library/closure/goog/demos/depsgraph.html +221 -0
- data/closure-library/closure/goog/demos/dialog.html +156 -0
- data/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
- data/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
- data/closure-library/closure/goog/demos/dom_selection.html +88 -0
- data/closure-library/closure/goog/demos/drag.html +191 -0
- data/closure-library/closure/goog/demos/dragdrop.html +263 -0
- data/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
- data/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
- data/closure-library/closure/goog/demos/dragger.html +83 -0
- data/closure-library/closure/goog/demos/draglistgroup.html +261 -0
- data/closure-library/closure/goog/demos/drilldownrow.html +78 -0
- data/closure-library/closure/goog/demos/editor/deps.js +20 -0
- data/closure-library/closure/goog/demos/editor/editor.html +139 -0
- data/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
- data/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
- data/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
- data/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
- data/closure-library/closure/goog/demos/editor/helloworlddialog.js +163 -0
- data/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
- data/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +110 -0
- data/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
- data/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
- data/closure-library/closure/goog/demos/effects.html +142 -0
- data/closure-library/closure/goog/demos/emoji/200.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/201.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/202.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/203.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/204.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/205.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/206.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/none.gif +0 -0
- data/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
- data/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
- data/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
- data/closure-library/closure/goog/demos/event-propagation.html +192 -0
- data/closure-library/closure/goog/demos/events.html +99 -0
- data/closure-library/closure/goog/demos/eventtarget.html +70 -0
- data/closure-library/closure/goog/demos/filedrophandler.html +63 -0
- data/closure-library/closure/goog/demos/filteredmenu.html +118 -0
- data/closure-library/closure/goog/demos/focushandler.html +58 -0
- data/closure-library/closure/goog/demos/gauge.html +158 -0
- data/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
- data/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
- data/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
- data/closure-library/closure/goog/demos/graphics/events.html +113 -0
- data/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
- data/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
- data/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
- data/closure-library/closure/goog/demos/graphics/tigerdata.js +2840 -0
- data/closure-library/closure/goog/demos/history1.html +132 -0
- data/closure-library/closure/goog/demos/history2.html +100 -0
- data/closure-library/closure/goog/demos/history3.html +106 -0
- data/closure-library/closure/goog/demos/history3js.html +36 -0
- data/closure-library/closure/goog/demos/history_blank.html +25 -0
- data/closure-library/closure/goog/demos/hovercard.html +177 -0
- data/closure-library/closure/goog/demos/hsvapalette.html +55 -0
- data/closure-library/closure/goog/demos/hsvpalette.html +56 -0
- data/closure-library/closure/goog/demos/html5history.html +87 -0
- data/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
- data/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
- data/closure-library/closure/goog/demos/imagelessroundedcorner.html +231 -0
- data/closure-library/closure/goog/demos/index.html +19 -0
- data/closure-library/closure/goog/demos/index_nav.html +253 -0
- data/closure-library/closure/goog/demos/index_splash.html +22 -0
- data/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
- data/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
- data/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
- data/closure-library/closure/goog/demos/inputhandler.html +72 -0
- data/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
- data/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
- data/closure-library/closure/goog/demos/keyhandler.html +127 -0
- data/closure-library/closure/goog/demos/labelinput.html +42 -0
- data/closure-library/closure/goog/demos/menu.html +220 -0
- data/closure-library/closure/goog/demos/menubutton.html +318 -0
- data/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
- data/closure-library/closure/goog/demos/offline.html +268 -0
- data/closure-library/closure/goog/demos/onlinehandler.html +77 -0
- data/closure-library/closure/goog/demos/palette.html +302 -0
- data/closure-library/closure/goog/demos/pastehandler.html +54 -0
- data/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
- data/closure-library/closure/goog/demos/popup.html +200 -0
- data/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
- data/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
- data/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
- data/closure-library/closure/goog/demos/popupmenu.html +89 -0
- data/closure-library/closure/goog/demos/progressbar.html +97 -0
- data/closure-library/closure/goog/demos/prompt.html +92 -0
- data/closure-library/closure/goog/demos/quadtree.html +107 -0
- data/closure-library/closure/goog/demos/ratings.html +120 -0
- data/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
- data/closure-library/closure/goog/demos/roundedpanel.html +139 -0
- data/closure-library/closure/goog/demos/samplecomponent.html +75 -0
- data/closure-library/closure/goog/demos/samplecomponent.js +206 -0
- data/closure-library/closure/goog/demos/scrollfloater.html +117 -0
- data/closure-library/closure/goog/demos/select.html +324 -0
- data/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
- data/closure-library/closure/goog/demos/serverchart.html +122 -0
- data/closure-library/closure/goog/demos/silverlightclipboardbutton.html +71 -0
- data/closure-library/closure/goog/demos/slider.html +110 -0
- data/closure-library/closure/goog/demos/splitbehavior.html +164 -0
- data/closure-library/closure/goog/demos/splitpane.html +243 -0
- data/closure-library/closure/goog/demos/stopevent.html +171 -0
- data/closure-library/closure/goog/demos/submenus.html +130 -0
- data/closure-library/closure/goog/demos/submenus2.html +150 -0
- data/closure-library/closure/goog/demos/tabbar.html +289 -0
- data/closure-library/closure/goog/demos/tablesorter.html +116 -0
- data/closure-library/closure/goog/demos/tabpane.html +302 -0
- data/closure-library/closure/goog/demos/textarea.html +128 -0
- data/closure-library/closure/goog/demos/timers.html +291 -0
- data/closure-library/closure/goog/demos/toolbar.html +703 -0
- data/closure-library/closure/goog/demos/tooltip.html +91 -0
- data/closure-library/closure/goog/demos/tracer.html +92 -0
- data/closure-library/closure/goog/demos/tree/demo.html +126 -0
- data/closure-library/closure/goog/demos/tree/testdata.js +260 -0
- data/closure-library/closure/goog/demos/tweakui.html +121 -0
- data/closure-library/closure/goog/demos/twothumbslider.html +121 -0
- data/closure-library/closure/goog/demos/useragent.html +173 -0
- data/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
- data/closure-library/closure/goog/demos/xpc/blank.html +7 -0
- data/closure-library/closure/goog/demos/xpc/index.html +89 -0
- data/closure-library/closure/goog/demos/xpc/inner.html +58 -0
- data/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
- data/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
- data/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
- data/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
- data/closure-library/closure/goog/demos/xpc/relay.html +7 -0
- data/closure-library/closure/goog/demos/xpc/xpcdemo.js +304 -0
- data/closure-library/closure/goog/demos/zippy.html +127 -0
- data/closure-library/closure/goog/deps.js +672 -0
- data/closure-library/closure/goog/disposable/disposable.js +167 -0
- data/closure-library/closure/goog/disposable/disposable_test.html +202 -0
- data/closure-library/closure/goog/dom/a11y.js +438 -0
- data/closure-library/closure/goog/dom/a11y_test.html +86 -0
- data/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
- data/closure-library/closure/goog/dom/abstractrange.js +514 -0
- data/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
- data/closure-library/closure/goog/dom/annotate.js +352 -0
- data/closure-library/closure/goog/dom/annotate_test.html +187 -0
- data/closure-library/closure/goog/dom/browserfeature.js +50 -0
- data/closure-library/closure/goog/dom/browserrange/abstractrange.js +316 -0
- data/closure-library/closure/goog/dom/browserrange/browserrange.js +149 -0
- data/closure-library/closure/goog/dom/browserrange/browserrange_test.html +562 -0
- data/closure-library/closure/goog/dom/browserrange/geckorange.js +82 -0
- data/closure-library/closure/goog/dom/browserrange/ierange.js +970 -0
- data/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
- data/closure-library/closure/goog/dom/browserrange/w3crange.js +364 -0
- data/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
- data/closure-library/closure/goog/dom/classes.js +233 -0
- data/closure-library/closure/goog/dom/classes_test.html +228 -0
- data/closure-library/closure/goog/dom/controlrange.js +511 -0
- data/closure-library/closure/goog/dom/controlrange_test.html +246 -0
- data/closure-library/closure/goog/dom/dataset.js +90 -0
- data/closure-library/closure/goog/dom/dataset_test.html +104 -0
- data/closure-library/closure/goog/dom/dom.js +2424 -0
- data/closure-library/closure/goog/dom/dom_quirks_test.html +104 -0
- data/closure-library/closure/goog/dom/dom_test.html +103 -0
- data/closure-library/closure/goog/dom/dom_test.js +1129 -0
- data/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
- data/closure-library/closure/goog/dom/fontsizemonitor_test.html +283 -0
- data/closure-library/closure/goog/dom/forms.js +403 -0
- data/closure-library/closure/goog/dom/forms_test.html +483 -0
- data/closure-library/closure/goog/dom/iframe.js +128 -0
- data/closure-library/closure/goog/dom/iframe_test.html +87 -0
- data/closure-library/closure/goog/dom/iter.js +127 -0
- data/closure-library/closure/goog/dom/iter_test.html +97 -0
- data/closure-library/closure/goog/dom/multirange.js +519 -0
- data/closure-library/closure/goog/dom/multirange_test.html +67 -0
- data/closure-library/closure/goog/dom/nodeiterator.js +85 -0
- data/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
- data/closure-library/closure/goog/dom/nodeoffset.js +111 -0
- data/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
- data/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
- data/closure-library/closure/goog/dom/pattern/allchildren.js +73 -0
- data/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
- data/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
- data/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
- data/closure-library/closure/goog/dom/pattern/childmatches.js +152 -0
- data/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
- data/closure-library/closure/goog/dom/pattern/fulltag.js +92 -0
- data/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
- data/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
- data/closure-library/closure/goog/dom/pattern/nodetype.js +57 -0
- data/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
- data/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
- data/closure-library/closure/goog/dom/pattern/repeat.js +188 -0
- data/closure-library/closure/goog/dom/pattern/sequence.js +139 -0
- data/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
- data/closure-library/closure/goog/dom/pattern/tag.js +149 -0
- data/closure-library/closure/goog/dom/pattern/text.js +69 -0
- data/closure-library/closure/goog/dom/range.js +220 -0
- data/closure-library/closure/goog/dom/range_test.html +702 -0
- data/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
- data/closure-library/closure/goog/dom/savedcaretrange.js +203 -0
- data/closure-library/closure/goog/dom/savedcaretrange_test.html +235 -0
- data/closure-library/closure/goog/dom/savedrange.js +74 -0
- data/closure-library/closure/goog/dom/savedrange_test.html +61 -0
- data/closure-library/closure/goog/dom/selection.js +470 -0
- data/closure-library/closure/goog/dom/selection_test.html +329 -0
- data/closure-library/closure/goog/dom/tagiterator.js +365 -0
- data/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
- data/closure-library/closure/goog/dom/tagname.js +121 -0
- data/closure-library/closure/goog/dom/tagname_test.html +37 -0
- data/closure-library/closure/goog/dom/textrange.js +611 -0
- data/closure-library/closure/goog/dom/textrange_test.html +127 -0
- data/closure-library/closure/goog/dom/textrangeiterator.js +246 -0
- data/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
- data/closure-library/closure/goog/dom/viewportsizemonitor.js +220 -0
- data/closure-library/closure/goog/dom/viewportsizemonitor_test.html +166 -0
- data/closure-library/closure/goog/dom/xml.js +187 -0
- data/closure-library/closure/goog/dom/xml_test.html +77 -0
- data/closure-library/closure/goog/editor/browserfeature.js +251 -0
- data/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
- data/closure-library/closure/goog/editor/clicktoeditwrapper.js +438 -0
- data/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
- data/closure-library/closure/goog/editor/command.js +74 -0
- data/closure-library/closure/goog/editor/defines.js +34 -0
- data/closure-library/closure/goog/editor/field.js +2594 -0
- data/closure-library/closure/goog/editor/field_test.html +1000 -0
- data/closure-library/closure/goog/editor/focus.js +32 -0
- data/closure-library/closure/goog/editor/focus_test.html +66 -0
- data/closure-library/closure/goog/editor/icontent.js +296 -0
- data/closure-library/closure/goog/editor/icontent_test.html +209 -0
- data/closure-library/closure/goog/editor/link.js +279 -0
- data/closure-library/closure/goog/editor/link_test.html +234 -0
- data/closure-library/closure/goog/editor/node.js +435 -0
- data/closure-library/closure/goog/editor/node_test.html +590 -0
- data/closure-library/closure/goog/editor/plugin.js +444 -0
- data/closure-library/closure/goog/editor/plugin_test.html +187 -0
- data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +535 -0
- data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +227 -0
- data/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +336 -0
- data/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +399 -0
- data/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
- data/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
- data/closure-library/closure/goog/editor/plugins/basictextformatter.js +1740 -0
- data/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
- data/closure-library/closure/goog/editor/plugins/blockquote.js +422 -0
- data/closure-library/closure/goog/editor/plugins/blockquote_test.html +149 -0
- data/closure-library/closure/goog/editor/plugins/emoticons.js +83 -0
- data/closure-library/closure/goog/editor/plugins/emoticons_test.html +67 -0
- data/closure-library/closure/goog/editor/plugins/enterhandler.js +730 -0
- data/closure-library/closure/goog/editor/plugins/enterhandler_test.html +739 -0
- data/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
- data/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
- data/closure-library/closure/goog/editor/plugins/linkbubble.js +458 -0
- data/closure-library/closure/goog/editor/plugins/linkbubble_test.html +309 -0
- data/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +222 -0
- data/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +370 -0
- data/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
- data/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
- data/closure-library/closure/goog/editor/plugins/loremipsum.js +186 -0
- data/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
- data/closure-library/closure/goog/editor/plugins/removeformatting.js +772 -0
- data/closure-library/closure/goog/editor/plugins/removeformatting_test.html +920 -0
- data/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
- data/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
- data/closure-library/closure/goog/editor/plugins/tableeditor.js +496 -0
- data/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
- data/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +741 -0
- data/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +481 -0
- data/closure-library/closure/goog/editor/plugins/undoredo.js +1014 -0
- data/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
- data/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
- data/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
- data/closure-library/closure/goog/editor/plugins/undoredostate.js +84 -0
- data/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
- data/closure-library/closure/goog/editor/range.js +602 -0
- data/closure-library/closure/goog/editor/range_test.html +880 -0
- data/closure-library/closure/goog/editor/seamlessfield.js +720 -0
- data/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +30 -0
- data/closure-library/closure/goog/editor/seamlessfield_test.html +33 -0
- data/closure-library/closure/goog/editor/seamlessfield_test.js +392 -0
- data/closure-library/closure/goog/editor/style.js +222 -0
- data/closure-library/closure/goog/editor/style_test.html +177 -0
- data/closure-library/closure/goog/editor/table.js +566 -0
- data/closure-library/closure/goog/editor/table_test.html +522 -0
- data/closure-library/closure/goog/events/actioneventwrapper.js +131 -0
- data/closure-library/closure/goog/events/actioneventwrapper_test.html +176 -0
- data/closure-library/closure/goog/events/actionhandler.js +189 -0
- data/closure-library/closure/goog/events/actionhandler_test.html +82 -0
- data/closure-library/closure/goog/events/browserevent.js +412 -0
- data/closure-library/closure/goog/events/browserevent_test.html +145 -0
- data/closure-library/closure/goog/events/browserfeature.js +43 -0
- data/closure-library/closure/goog/events/event.js +123 -0
- data/closure-library/closure/goog/events/event_test.html +70 -0
- data/closure-library/closure/goog/events/eventhandler.js +348 -0
- data/closure-library/closure/goog/events/eventhandler_test.html +230 -0
- data/closure-library/closure/goog/events/events.js +1101 -0
- data/closure-library/closure/goog/events/events_test.html +362 -0
- data/closure-library/closure/goog/events/eventtarget.js +197 -0
- data/closure-library/closure/goog/events/eventtarget_test.html +423 -0
- data/closure-library/closure/goog/events/eventtype.js +107 -0
- data/closure-library/closure/goog/events/eventwrapper.js +67 -0
- data/closure-library/closure/goog/events/filedrophandler.js +224 -0
- data/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
- data/closure-library/closure/goog/events/focushandler.js +111 -0
- data/closure-library/closure/goog/events/imehandler.js +365 -0
- data/closure-library/closure/goog/events/imehandler_test.html +271 -0
- data/closure-library/closure/goog/events/inputhandler.js +218 -0
- data/closure-library/closure/goog/events/keycodes.js +314 -0
- data/closure-library/closure/goog/events/keycodes_test.html +72 -0
- data/closure-library/closure/goog/events/keyhandler.js +522 -0
- data/closure-library/closure/goog/events/keyhandler_test.html +621 -0
- data/closure-library/closure/goog/events/keynames.js +124 -0
- data/closure-library/closure/goog/events/listener.js +160 -0
- data/closure-library/closure/goog/events/mousewheelhandler.js +280 -0
- data/closure-library/closure/goog/events/mousewheelhandler_test.html +331 -0
- data/closure-library/closure/goog/events/onlinehandler.js +176 -0
- data/closure-library/closure/goog/events/onlinelistener_test.html +214 -0
- data/closure-library/closure/goog/events/pastehandler.js +444 -0
- data/closure-library/closure/goog/events/pastehandler_test.html +354 -0
- data/closure-library/closure/goog/events/pools.js +342 -0
- data/closure-library/closure/goog/format/emailaddress.js +329 -0
- data/closure-library/closure/goog/format/emailaddress_test.html +179 -0
- data/closure-library/closure/goog/format/format.js +451 -0
- data/closure-library/closure/goog/format/format_test.html +257 -0
- data/closure-library/closure/goog/format/htmlprettyprinter.js +406 -0
- data/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
- data/closure-library/closure/goog/format/jsonprettyprinter.js +405 -0
- data/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
- data/closure-library/closure/goog/fs/entry.js +406 -0
- data/closure-library/closure/goog/fs/error.js +103 -0
- data/closure-library/closure/goog/fs/filesaver.js +214 -0
- data/closure-library/closure/goog/fs/filesystem.js +59 -0
- data/closure-library/closure/goog/fs/filewriter.js +106 -0
- data/closure-library/closure/goog/fs/fs.js +183 -0
- data/closure-library/closure/goog/fs/fs_test.html +270 -0
- data/closure-library/closure/goog/functions/functions.js +219 -0
- data/closure-library/closure/goog/functions/functions_test.html +198 -0
- data/closure-library/closure/goog/fx/abstractdragdrop.js +1451 -0
- data/closure-library/closure/goog/fx/abstractdragdrop_test.html +430 -0
- data/closure-library/closure/goog/fx/animation.js +621 -0
- data/closure-library/closure/goog/fx/animationqueue.js +348 -0
- data/closure-library/closure/goog/fx/cssspriteanimation.js +112 -0
- data/closure-library/closure/goog/fx/cssspriteanimation_test.html +125 -0
- data/closure-library/closure/goog/fx/dom.js +610 -0
- data/closure-library/closure/goog/fx/dragdrop.js +49 -0
- data/closure-library/closure/goog/fx/dragdropgroup.js +107 -0
- data/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
- data/closure-library/closure/goog/fx/dragger.js +731 -0
- data/closure-library/closure/goog/fx/dragger_test.html +415 -0
- data/closure-library/closure/goog/fx/draglistgroup.js +1159 -0
- data/closure-library/closure/goog/fx/draglistgroup_test.html +231 -0
- data/closure-library/closure/goog/fx/dragscrollsupport.js +274 -0
- data/closure-library/closure/goog/fx/dragscrollsupport_test.html +253 -0
- data/closure-library/closure/goog/fx/easing.js +50 -0
- data/closure-library/closure/goog/fx/fx.js +30 -0
- data/closure-library/closure/goog/fx/fx_test.html +157 -0
- data/closure-library/closure/goog/gears/basestore.js +523 -0
- data/closure-library/closure/goog/gears/basestore_test.html +247 -0
- data/closure-library/closure/goog/gears/database.js +935 -0
- data/closure-library/closure/goog/gears/database_test.html +699 -0
- data/closure-library/closure/goog/gears/fakeworkerpool.js +252 -0
- data/closure-library/closure/goog/gears/fakeworkerpool_test.html +188 -0
- data/closure-library/closure/goog/gears/gears.js +228 -0
- data/closure-library/closure/goog/gears/gears_test.html +78 -0
- data/closure-library/closure/goog/gears/httprequest.js +77 -0
- data/closure-library/closure/goog/gears/loggerclient.js +131 -0
- data/closure-library/closure/goog/gears/loggerclient_test.html +171 -0
- data/closure-library/closure/goog/gears/loggerserver.js +158 -0
- data/closure-library/closure/goog/gears/loggerserver_test.html +118 -0
- data/closure-library/closure/goog/gears/logstore.js +479 -0
- data/closure-library/closure/goog/gears/logstore_test.html +600 -0
- data/closure-library/closure/goog/gears/managedresourcestore.js +553 -0
- data/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
- data/closure-library/closure/goog/gears/multipartformdata.js +203 -0
- data/closure-library/closure/goog/gears/multipartformdata_test.html +220 -0
- data/closure-library/closure/goog/gears/statustype.js +37 -0
- data/closure-library/closure/goog/gears/urlcapture.js +370 -0
- data/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
- data/closure-library/closure/goog/gears/worker.js +201 -0
- data/closure-library/closure/goog/gears/workerchannel.js +205 -0
- data/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
- data/closure-library/closure/goog/gears/workerpool.js +241 -0
- data/closure-library/closure/goog/gears/workerpool_test.html +203 -0
- data/closure-library/closure/goog/graphics/abstractgraphics.js +439 -0
- data/closure-library/closure/goog/graphics/affinetransform.js +497 -0
- data/closure-library/closure/goog/graphics/affinetransform_test.html +316 -0
- data/closure-library/closure/goog/graphics/canvaselement.js +776 -0
- data/closure-library/closure/goog/graphics/canvasgraphics.js +632 -0
- data/closure-library/closure/goog/graphics/element.js +145 -0
- data/closure-library/closure/goog/graphics/ellipseelement.js +59 -0
- data/closure-library/closure/goog/graphics/ext/coordinates.js +158 -0
- data/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
- data/closure-library/closure/goog/graphics/ext/element.js +970 -0
- data/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
- data/closure-library/closure/goog/graphics/ext/ellipse.js +58 -0
- data/closure-library/closure/goog/graphics/ext/ext.js +29 -0
- data/closure-library/closure/goog/graphics/ext/graphics.js +209 -0
- data/closure-library/closure/goog/graphics/ext/group.js +213 -0
- data/closure-library/closure/goog/graphics/ext/image.js +62 -0
- data/closure-library/closure/goog/graphics/ext/path.js +140 -0
- data/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
- data/closure-library/closure/goog/graphics/ext/rectangle.js +53 -0
- data/closure-library/closure/goog/graphics/ext/shape.js +144 -0
- data/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +69 -0
- data/closure-library/closure/goog/graphics/fill.js +29 -0
- data/closure-library/closure/goog/graphics/font.js +59 -0
- data/closure-library/closure/goog/graphics/graphics.js +124 -0
- data/closure-library/closure/goog/graphics/groupelement.js +54 -0
- data/closure-library/closure/goog/graphics/imageelement.js +67 -0
- data/closure-library/closure/goog/graphics/lineargradient.js +131 -0
- data/closure-library/closure/goog/graphics/path.js +508 -0
- data/closure-library/closure/goog/graphics/path_test.html +359 -0
- data/closure-library/closure/goog/graphics/pathelement.js +50 -0
- data/closure-library/closure/goog/graphics/paths.js +86 -0
- data/closure-library/closure/goog/graphics/paths_test.html +97 -0
- data/closure-library/closure/goog/graphics/rectelement.js +59 -0
- data/closure-library/closure/goog/graphics/solidfill.js +70 -0
- data/closure-library/closure/goog/graphics/stroke.js +63 -0
- data/closure-library/closure/goog/graphics/strokeandfillelement.js +110 -0
- data/closure-library/closure/goog/graphics/svgelement.js +262 -0
- data/closure-library/closure/goog/graphics/svggraphics.js +813 -0
- data/closure-library/closure/goog/graphics/textelement.js +51 -0
- data/closure-library/closure/goog/graphics/vmlelement.js +380 -0
- data/closure-library/closure/goog/graphics/vmlgraphics.js +863 -0
- data/closure-library/closure/goog/history/event.js +54 -0
- data/closure-library/closure/goog/history/eventtype.js +30 -0
- data/closure-library/closure/goog/history/history.js +979 -0
- data/closure-library/closure/goog/history/html5history.js +303 -0
- data/closure-library/closure/goog/history/html5history_test.html +163 -0
- data/closure-library/closure/goog/i18n/bidi.js +772 -0
- data/closure-library/closure/goog/i18n/bidi_test.html +414 -0
- data/closure-library/closure/goog/i18n/bidiformatter.js +488 -0
- data/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
- data/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
- data/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
- data/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
- data/closure-library/closure/goog/i18n/currency.js +385 -0
- data/closure-library/closure/goog/i18n/currency_test.html +202 -0
- data/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
- data/closure-library/closure/goog/i18n/datetimeformat.js +636 -0
- data/closure-library/closure/goog/i18n/datetimeformat_test.html +436 -0
- data/closure-library/closure/goog/i18n/datetimeparse.js +1111 -0
- data/closure-library/closure/goog/i18n/datetimeparse_test.html +796 -0
- data/closure-library/closure/goog/i18n/datetimepatterns.js +1586 -0
- data/closure-library/closure/goog/i18n/datetimepatternsext.js +7386 -0
- data/closure-library/closure/goog/i18n/datetimesymbols.js +3350 -0
- data/closure-library/closure/goog/i18n/datetimesymbolsext.js +12938 -0
- data/closure-library/closure/goog/i18n/graphemebreak.js +181 -0
- data/closure-library/closure/goog/i18n/graphemebreak_test.html +72 -0
- data/closure-library/closure/goog/i18n/messageformat.js +553 -0
- data/closure-library/closure/goog/i18n/messageformat_test.html +323 -0
- data/closure-library/closure/goog/i18n/mime.js +100 -0
- data/closure-library/closure/goog/i18n/mime_test.html +51 -0
- data/closure-library/closure/goog/i18n/numberformat.js +763 -0
- data/closure-library/closure/goog/i18n/numberformat_test.html +605 -0
- data/closure-library/closure/goog/i18n/numberformatsymbols.js +10358 -0
- data/closure-library/closure/goog/i18n/pluralrules.js +695 -0
- data/closure-library/closure/goog/i18n/timezone.js +341 -0
- data/closure-library/closure/goog/i18n/timezone_test.html +163 -0
- data/closure-library/closure/goog/i18n/uchar.js +1160 -0
- data/closure-library/closure/goog/i18n/uchar_test.html +72 -0
- data/closure-library/closure/goog/images/blank.gif +0 -0
- data/closure-library/closure/goog/images/bubble_close.jpg +0 -0
- data/closure-library/closure/goog/images/bubble_left.gif +0 -0
- data/closure-library/closure/goog/images/bubble_right.gif +0 -0
- data/closure-library/closure/goog/images/button-bg.gif +0 -0
- data/closure-library/closure/goog/images/check-outline.gif +0 -0
- data/closure-library/closure/goog/images/check-sprite.gif +0 -0
- data/closure-library/closure/goog/images/check.gif +0 -0
- data/closure-library/closure/goog/images/close_box.gif +0 -0
- data/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
- data/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
- data/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
- data/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
- data/closure-library/closure/goog/images/dropdn.gif +0 -0
- data/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
- data/closure-library/closure/goog/images/dropdown.gif +0 -0
- data/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
- data/closure-library/closure/goog/images/gears_offline.gif +0 -0
- data/closure-library/closure/goog/images/gears_online.gif +0 -0
- data/closure-library/closure/goog/images/gears_paused.gif +0 -0
- data/closure-library/closure/goog/images/gears_syncing.gif +0 -0
- data/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
- data/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
- data/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
- data/closure-library/closure/goog/images/hsv-sprite.png +0 -0
- data/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
- data/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
- data/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
- data/closure-library/closure/goog/images/hsva-sprite.png +0 -0
- data/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
- data/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
- data/closure-library/closure/goog/images/menu-arrows.gif +0 -0
- data/closure-library/closure/goog/images/minus.png +0 -0
- data/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
- data/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
- data/closure-library/closure/goog/images/offlineicons.png +0 -0
- data/closure-library/closure/goog/images/plus.png +0 -0
- data/closure-library/closure/goog/images/ratingstars.gif +0 -0
- data/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
- data/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
- data/closure-library/closure/goog/images/toolbar-bg.png +0 -0
- data/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
- data/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
- data/closure-library/closure/goog/images/tree/I.png +0 -0
- data/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
- data/closure-library/closure/goog/images/tree/tree.gif +0 -0
- data/closure-library/closure/goog/images/tree/tree.png +0 -0
- data/closure-library/closure/goog/images/ui_controls.jpg +0 -0
- data/closure-library/closure/goog/iter/iter.js +627 -0
- data/closure-library/closure/goog/iter/iter_test.html +443 -0
- data/closure-library/closure/goog/json/json.js +302 -0
- data/closure-library/closure/goog/json/json_test.html +501 -0
- data/closure-library/closure/goog/locale/countries.js +288 -0
- data/closure-library/closure/goog/locale/countrylanguagenames_test.html +233 -0
- data/closure-library/closure/goog/locale/defaultlocalenameconstants.js +847 -0
- data/closure-library/closure/goog/locale/genericfontnames.js +73 -0
- data/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
- data/closure-library/closure/goog/locale/genericfontnamesdata.js +328 -0
- data/closure-library/closure/goog/locale/locale.js +397 -0
- data/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
- data/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
- data/closure-library/closure/goog/locale/timezonedetection.js +117 -0
- data/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
- data/closure-library/closure/goog/locale/timezonefingerprint.js +250 -0
- data/closure-library/closure/goog/locale/timezonelist.js +129 -0
- data/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
- data/closure-library/closure/goog/math/bezier.js +244 -0
- data/closure-library/closure/goog/math/bezier_test.html +70 -0
- data/closure-library/closure/goog/math/box.js +236 -0
- data/closure-library/closure/goog/math/box_test.html +139 -0
- data/closure-library/closure/goog/math/coordinate.js +136 -0
- data/closure-library/closure/goog/math/coordinate3.js +168 -0
- data/closure-library/closure/goog/math/coordinate3_test.html +208 -0
- data/closure-library/closure/goog/math/coordinate_test.html +92 -0
- data/closure-library/closure/goog/math/integer.js +736 -0
- data/closure-library/closure/goog/math/integer_test.html +1653 -0
- data/closure-library/closure/goog/math/line.js +177 -0
- data/closure-library/closure/goog/math/line_test.html +62 -0
- data/closure-library/closure/goog/math/long.js +801 -0
- data/closure-library/closure/goog/math/long_test.html +1571 -0
- data/closure-library/closure/goog/math/math.js +355 -0
- data/closure-library/closure/goog/math/math_test.html +254 -0
- data/closure-library/closure/goog/math/matrix.js +669 -0
- data/closure-library/closure/goog/math/matrix_test.html +427 -0
- data/closure-library/closure/goog/math/range.js +146 -0
- data/closure-library/closure/goog/math/range_test.html +103 -0
- data/closure-library/closure/goog/math/rangeset.js +368 -0
- data/closure-library/closure/goog/math/rangeset_test.html +619 -0
- data/closure-library/closure/goog/math/rect.js +340 -0
- data/closure-library/closure/goog/math/rect_test.html +315 -0
- data/closure-library/closure/goog/math/size.js +201 -0
- data/closure-library/closure/goog/math/size_test.html +174 -0
- data/closure-library/closure/goog/math/vec2.js +255 -0
- data/closure-library/closure/goog/math/vec2_test.html +203 -0
- data/closure-library/closure/goog/math/vec3.js +327 -0
- data/closure-library/closure/goog/math/vec3_test.html +231 -0
- data/closure-library/closure/goog/memoize/memoize.js +98 -0
- data/closure-library/closure/goog/memoize/memoize_test.html +157 -0
- data/closure-library/closure/goog/messaging/abstractchannel.js +209 -0
- data/closure-library/closure/goog/messaging/abstractchannel_test.html +90 -0
- data/closure-library/closure/goog/messaging/bufferedchannel.js +277 -0
- data/closure-library/closure/goog/messaging/bufferedchannel_test.html +205 -0
- data/closure-library/closure/goog/messaging/deferredchannel.js +79 -0
- data/closure-library/closure/goog/messaging/deferredchannel_test.html +107 -0
- data/closure-library/closure/goog/messaging/loggerclient.js +131 -0
- data/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
- data/closure-library/closure/goog/messaging/loggerserver.js +94 -0
- data/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
- data/closure-library/closure/goog/messaging/messagechannel.js +115 -0
- data/closure-library/closure/goog/messaging/messaging.js +34 -0
- data/closure-library/closure/goog/messaging/messaging_test.html +42 -0
- data/closure-library/closure/goog/messaging/multichannel.js +303 -0
- data/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
- data/closure-library/closure/goog/messaging/portchannel.js +341 -0
- data/closure-library/closure/goog/messaging/portchannel_test.html +359 -0
- data/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
- data/closure-library/closure/goog/module/abstractmoduleloader.js +46 -0
- data/closure-library/closure/goog/module/basemodule.js +45 -0
- data/closure-library/closure/goog/module/basemoduleloader.js +210 -0
- data/closure-library/closure/goog/module/loader.js +269 -0
- data/closure-library/closure/goog/module/module.js +166 -0
- data/closure-library/closure/goog/module/moduleinfo.js +336 -0
- data/closure-library/closure/goog/module/moduleinfo_test.html +109 -0
- data/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
- data/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
- data/closure-library/closure/goog/module/moduleloader.js +250 -0
- data/closure-library/closure/goog/module/moduleloader_test.html +244 -0
- data/closure-library/closure/goog/module/modulemanager.js +1008 -0
- data/closure-library/closure/goog/module/modulemanager_test.html +1240 -0
- data/closure-library/closure/goog/module/testdata/modA_1.js +22 -0
- data/closure-library/closure/goog/module/testdata/modA_2.js +24 -0
- data/closure-library/closure/goog/module/testdata/modB_1.js +24 -0
- data/closure-library/closure/goog/net/browserchannel.js +2441 -0
- data/closure-library/closure/goog/net/browserchannel_test.html +1176 -0
- data/closure-library/closure/goog/net/browsertestchannel.js +552 -0
- data/closure-library/closure/goog/net/bulkloader.js +174 -0
- data/closure-library/closure/goog/net/bulkloader_test.html +232 -0
- data/closure-library/closure/goog/net/bulkloaderhelper.js +129 -0
- data/closure-library/closure/goog/net/channeldebug.js +288 -0
- data/closure-library/closure/goog/net/channelrequest.js +1125 -0
- data/closure-library/closure/goog/net/channelrequest_test.html +158 -0
- data/closure-library/closure/goog/net/cookies.js +401 -0
- data/closure-library/closure/goog/net/cookies_test.html +255 -0
- data/closure-library/closure/goog/net/crossdomainrpc.js +848 -0
- data/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
- data/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
- data/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
- data/closure-library/closure/goog/net/errorcode.js +130 -0
- data/closure-library/closure/goog/net/eventtype.js +37 -0
- data/closure-library/closure/goog/net/iframe_xhr_test.html +142 -0
- data/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
- data/closure-library/closure/goog/net/iframeio.js +1342 -0
- data/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
- data/closure-library/closure/goog/net/iframeio_different_base_test.html +42 -0
- data/closure-library/closure/goog/net/iframeio_test.html +368 -0
- data/closure-library/closure/goog/net/iframeloadmonitor.js +199 -0
- data/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
- data/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
- data/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
- data/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
- data/closure-library/closure/goog/net/imageloader.js +237 -0
- data/closure-library/closure/goog/net/imageloader_test.html +200 -0
- data/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
- data/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
- data/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
- data/closure-library/closure/goog/net/jsonp.js +379 -0
- data/closure-library/closure/goog/net/jsonp_test.html +328 -0
- data/closure-library/closure/goog/net/mockiframeio.js +318 -0
- data/closure-library/closure/goog/net/mockxhrlite.js +34 -0
- data/closure-library/closure/goog/net/mockxhrlite_test.html +109 -0
- data/closure-library/closure/goog/net/multiiframeloadmonitor.js +116 -0
- data/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
- data/closure-library/closure/goog/net/networktester.js +383 -0
- data/closure-library/closure/goog/net/networktester_test.html +227 -0
- data/closure-library/closure/goog/net/tmpnetwork.js +168 -0
- data/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
- data/closure-library/closure/goog/net/xhrio.js +1093 -0
- data/closure-library/closure/goog/net/xhrio_test.html +603 -0
- data/closure-library/closure/goog/net/xhriopool.js +87 -0
- data/closure-library/closure/goog/net/xhrlite.js +119 -0
- data/closure-library/closure/goog/net/xhrlite_test.html +156 -0
- data/closure-library/closure/goog/net/xhrlitepool.js +37 -0
- data/closure-library/closure/goog/net/xhrmanager.js +763 -0
- data/closure-library/closure/goog/net/xhrmonitor.js +254 -0
- data/closure-library/closure/goog/net/xhrmonitor_test.html +199 -0
- data/closure-library/closure/goog/net/xmlhttp.js +215 -0
- data/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
- data/closure-library/closure/goog/net/xpc/crosspagechannel.js +624 -0
- data/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +422 -0
- data/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +251 -0
- data/closure-library/closure/goog/net/xpc/iframepollingtransport.js +822 -0
- data/closure-library/closure/goog/net/xpc/iframerelaytransport.js +288 -0
- data/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +280 -0
- data/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +164 -0
- data/closure-library/closure/goog/net/xpc/nixtransport.js +454 -0
- data/closure-library/closure/goog/net/xpc/relay.js +72 -0
- data/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +106 -0
- data/closure-library/closure/goog/net/xpc/transport.js +104 -0
- data/closure-library/closure/goog/net/xpc/xpc.js +238 -0
- data/closure-library/closure/goog/object/object.js +553 -0
- data/closure-library/closure/goog/object/object_test.html +376 -0
- data/closure-library/closure/goog/positioning/absoluteposition.js +73 -0
- data/closure-library/closure/goog/positioning/abstractposition.js +47 -0
- data/closure-library/closure/goog/positioning/anchoredposition.js +78 -0
- data/closure-library/closure/goog/positioning/anchoredviewportposition.js +126 -0
- data/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +117 -0
- data/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
- data/closure-library/closure/goog/positioning/clientposition.js +75 -0
- data/closure-library/closure/goog/positioning/menuanchoredposition.js +97 -0
- data/closure-library/closure/goog/positioning/positioning.js +476 -0
- data/closure-library/closure/goog/positioning/positioning_test.html +877 -0
- data/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
- data/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
- data/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
- data/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
- data/closure-library/closure/goog/positioning/viewportclientposition.js +102 -0
- data/closure-library/closure/goog/positioning/viewportclientposition_test.html +172 -0
- data/closure-library/closure/goog/positioning/viewportposition.js +63 -0
- data/closure-library/closure/goog/proto/proto.js +43 -0
- data/closure-library/closure/goog/proto/serializer.js +68 -0
- data/closure-library/closure/goog/proto/serializer_test.html +43 -0
- data/closure-library/closure/goog/proto2/descriptor.js +198 -0
- data/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
- data/closure-library/closure/goog/proto2/fielddescriptor.js +288 -0
- data/closure-library/closure/goog/proto2/fielddescriptor_test.html +124 -0
- data/closure-library/closure/goog/proto2/lazydeserializer.js +69 -0
- data/closure-library/closure/goog/proto2/message.js +726 -0
- data/closure-library/closure/goog/proto2/message_test.html +356 -0
- data/closure-library/closure/goog/proto2/objectserializer.js +159 -0
- data/closure-library/closure/goog/proto2/objectserializer_test.html +423 -0
- data/closure-library/closure/goog/proto2/package_test.pb.js +164 -0
- data/closure-library/closure/goog/proto2/pbliteserializer.js +150 -0
- data/closure-library/closure/goog/proto2/pbliteserializer_test.html +267 -0
- data/closure-library/closure/goog/proto2/proto_test.html +693 -0
- data/closure-library/closure/goog/proto2/serializer.js +148 -0
- data/closure-library/closure/goog/proto2/test.pb.js +2820 -0
- data/closure-library/closure/goog/proto2/util.js +54 -0
- data/closure-library/closure/goog/pubsub/pubsub.js +326 -0
- data/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
- data/closure-library/closure/goog/reflect/reflect.js +50 -0
- data/closure-library/closure/goog/spell/spellcheck.js +474 -0
- data/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
- data/closure-library/closure/goog/string/path.js +100 -0
- data/closure-library/closure/goog/string/path_test.html +59 -0
- data/closure-library/closure/goog/string/string.js +1207 -0
- data/closure-library/closure/goog/string/string_test.html +877 -0
- data/closure-library/closure/goog/string/stringbuffer.js +167 -0
- data/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
- data/closure-library/closure/goog/string/stringformat.js +247 -0
- data/closure-library/closure/goog/string/stringformat_test.html +211 -0
- data/closure-library/closure/goog/structs/avltree.js +769 -0
- data/closure-library/closure/goog/structs/avltree_test.html +241 -0
- data/closure-library/closure/goog/structs/circularbuffer.js +219 -0
- data/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
- data/closure-library/closure/goog/structs/heap.js +332 -0
- data/closure-library/closure/goog/structs/heap_test.html +220 -0
- data/closure-library/closure/goog/structs/inversionmap.js +159 -0
- data/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
- data/closure-library/closure/goog/structs/linkedmap.js +472 -0
- data/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
- data/closure-library/closure/goog/structs/map.js +446 -0
- data/closure-library/closure/goog/structs/map_test.html +430 -0
- data/closure-library/closure/goog/structs/node.js +74 -0
- data/closure-library/closure/goog/structs/pool.js +344 -0
- data/closure-library/closure/goog/structs/pool_test.html +265 -0
- data/closure-library/closure/goog/structs/prioritypool.js +147 -0
- data/closure-library/closure/goog/structs/prioritypool_test.html +478 -0
- data/closure-library/closure/goog/structs/priorityqueue.js +64 -0
- data/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
- data/closure-library/closure/goog/structs/quadtree.js +571 -0
- data/closure-library/closure/goog/structs/quadtree_test.html +179 -0
- data/closure-library/closure/goog/structs/queue.js +157 -0
- data/closure-library/closure/goog/structs/queue_test.html +140 -0
- data/closure-library/closure/goog/structs/set.js +251 -0
- data/closure-library/closure/goog/structs/set_test.html +551 -0
- data/closure-library/closure/goog/structs/simplepool.js +203 -0
- data/closure-library/closure/goog/structs/stringset.js +404 -0
- data/closure-library/closure/goog/structs/stringset_test.html +251 -0
- data/closure-library/closure/goog/structs/structs.js +341 -0
- data/closure-library/closure/goog/structs/structs_test.html +1050 -0
- data/closure-library/closure/goog/structs/treenode.js +312 -0
- data/closure-library/closure/goog/structs/treenode_test.html +285 -0
- data/closure-library/closure/goog/structs/trie.js +368 -0
- data/closure-library/closure/goog/structs/trie_test.html +378 -0
- data/closure-library/closure/goog/style/cursor.js +125 -0
- data/closure-library/closure/goog/style/cursor_test.html +131 -0
- data/closure-library/closure/goog/style/style.js +1804 -0
- data/closure-library/closure/goog/style/style_quirks_test.html +1928 -0
- data/closure-library/closure/goog/style/style_test.html +2073 -0
- data/closure-library/closure/goog/style/style_test_iframe_quirk.html +29 -0
- data/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
- data/closure-library/closure/goog/style/style_test_quirk.html +9 -0
- data/closure-library/closure/goog/style/style_test_standard.html +11 -0
- data/closure-library/closure/goog/testing/asserts.js +970 -0
- data/closure-library/closure/goog/testing/asserts_test.html +966 -0
- data/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
- data/closure-library/closure/goog/testing/async/mockcontrol_test.html +224 -0
- data/closure-library/closure/goog/testing/asynctestcase.js +812 -0
- data/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
- data/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
- data/closure-library/closure/goog/testing/benchmark.js +87 -0
- data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton.js +64 -0
- data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton_test.html +58 -0
- data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar.js +66 -0
- data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar_test.html +49 -0
- data/closure-library/closure/goog/testing/continuationtestcase.js +682 -0
- data/closure-library/closure/goog/testing/continuationtestcase_test.html +349 -0
- data/closure-library/closure/goog/testing/deferredtestcase.js +157 -0
- data/closure-library/closure/goog/testing/deferredtestcase_test.html +152 -0
- data/closure-library/closure/goog/testing/dom.js +596 -0
- data/closure-library/closure/goog/testing/dom_test.html +438 -0
- data/closure-library/closure/goog/testing/editor/dom.js +293 -0
- data/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
- data/closure-library/closure/goog/testing/editor/fieldmock.js +90 -0
- data/closure-library/closure/goog/testing/editor/testhelper.js +168 -0
- data/closure-library/closure/goog/testing/editor/testhelper_test.html +176 -0
- data/closure-library/closure/goog/testing/events/eventobserver.js +85 -0
- data/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
- data/closure-library/closure/goog/testing/events/events.js +540 -0
- data/closure-library/closure/goog/testing/events/events_test.html +434 -0
- data/closure-library/closure/goog/testing/events/matchers.js +41 -0
- data/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
- data/closure-library/closure/goog/testing/expectedfailures.js +236 -0
- data/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
- data/closure-library/closure/goog/testing/fs/blob.js +74 -0
- data/closure-library/closure/goog/testing/fs/blob_test.html +53 -0
- data/closure-library/closure/goog/testing/fs/directoryentry_test.html +185 -0
- data/closure-library/closure/goog/testing/fs/entry.js +511 -0
- data/closure-library/closure/goog/testing/fs/entry_test.html +153 -0
- data/closure-library/closure/goog/testing/fs/file.js +51 -0
- data/closure-library/closure/goog/testing/fs/fileentry_test.html +54 -0
- data/closure-library/closure/goog/testing/fs/filesystem.js +64 -0
- data/closure-library/closure/goog/testing/fs/filewriter.js +314 -0
- data/closure-library/closure/goog/testing/fs/filewriter_test.html +248 -0
- data/closure-library/closure/goog/testing/fs/fs.js +146 -0
- data/closure-library/closure/goog/testing/fs/fs_test.html +54 -0
- data/closure-library/closure/goog/testing/fs/integration_test.html +219 -0
- data/closure-library/closure/goog/testing/functionmock.js +157 -0
- data/closure-library/closure/goog/testing/functionmock_test.html +357 -0
- data/closure-library/closure/goog/testing/graphics.js +64 -0
- data/closure-library/closure/goog/testing/jsunit.js +144 -0
- data/closure-library/closure/goog/testing/loosemock.js +240 -0
- data/closure-library/closure/goog/testing/loosemock_test.html +343 -0
- data/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +77 -0
- data/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
- data/closure-library/closure/goog/testing/mock.js +556 -0
- data/closure-library/closure/goog/testing/mock_test.html +208 -0
- data/closure-library/closure/goog/testing/mockclassfactory.js +580 -0
- data/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
- data/closure-library/closure/goog/testing/mockclock.js +395 -0
- data/closure-library/closure/goog/testing/mockclock_test.html +413 -0
- data/closure-library/closure/goog/testing/mockcontrol.js +210 -0
- data/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
- data/closure-library/closure/goog/testing/mockinterface.js +45 -0
- data/closure-library/closure/goog/testing/mockmatchers.js +395 -0
- data/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
- data/closure-library/closure/goog/testing/mockrandom.js +128 -0
- data/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
- data/closure-library/closure/goog/testing/mockrange.js +65 -0
- data/closure-library/closure/goog/testing/mockrange_test.html +41 -0
- data/closure-library/closure/goog/testing/mockuseragent.js +143 -0
- data/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
- data/closure-library/closure/goog/testing/multitestrunner.js +1442 -0
- data/closure-library/closure/goog/testing/net/xhrio.js +595 -0
- data/closure-library/closure/goog/testing/net/xhrio_test.html +321 -0
- data/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
- data/closure-library/closure/goog/testing/performancetable.css +46 -0
- data/closure-library/closure/goog/testing/performancetable.js +162 -0
- data/closure-library/closure/goog/testing/performancetimer.js +166 -0
- data/closure-library/closure/goog/testing/performancetimer_test.html +107 -0
- data/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
- data/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
- data/closure-library/closure/goog/testing/pseudorandom.js +162 -0
- data/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
- data/closure-library/closure/goog/testing/recordfunction.js +194 -0
- data/closure-library/closure/goog/testing/recordfunction_test.html +147 -0
- data/closure-library/closure/goog/testing/singleton.js +82 -0
- data/closure-library/closure/goog/testing/singleton_test.html +39 -0
- data/closure-library/closure/goog/testing/stacktrace.js +470 -0
- data/closure-library/closure/goog/testing/stacktrace_test.html +229 -0
- data/closure-library/closure/goog/testing/strictmock.js +124 -0
- data/closure-library/closure/goog/testing/strictmock_test.html +368 -0
- data/closure-library/closure/goog/testing/style/layoutasserts.js +368 -0
- data/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
- data/closure-library/closure/goog/testing/testcase.js +1053 -0
- data/closure-library/closure/goog/testing/testqueue.js +66 -0
- data/closure-library/closure/goog/testing/testrunner.js +391 -0
- data/closure-library/closure/goog/testing/ui/rendererasserts.js +50 -0
- data/closure-library/closure/goog/testing/ui/rendererasserts_test.html +51 -0
- data/closure-library/closure/goog/testing/ui/rendererharness.js +175 -0
- data/closure-library/closure/goog/testing/ui/style.js +137 -0
- data/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
- data/closure-library/closure/goog/testing/ui/style_test.html +130 -0
- data/closure-library/closure/goog/timer/timer.js +285 -0
- data/closure-library/closure/goog/timer/timer_test.html +118 -0
- data/closure-library/closure/goog/tweak/entries.js +990 -0
- data/closure-library/closure/goog/tweak/entries_test.html +94 -0
- data/closure-library/closure/goog/tweak/registry.js +310 -0
- data/closure-library/closure/goog/tweak/registry_test.html +144 -0
- data/closure-library/closure/goog/tweak/testhelpers.js +111 -0
- data/closure-library/closure/goog/tweak/tweak.js +318 -0
- data/closure-library/closure/goog/tweak/tweakui.js +817 -0
- data/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
- data/closure-library/closure/goog/ui/abstractspellchecker.js +1069 -0
- data/closure-library/closure/goog/ui/activitymonitor.js +286 -0
- data/closure-library/closure/goog/ui/activitymonitor_test.html +44 -0
- data/closure-library/closure/goog/ui/advancedtooltip.js +369 -0
- data/closure-library/closure/goog/ui/advancedtooltip_test.html +274 -0
- data/closure-library/closure/goog/ui/animatedzippy.js +190 -0
- data/closure-library/closure/goog/ui/attachablemenu.js +464 -0
- data/closure-library/closure/goog/ui/autocomplete/arraymatcher.js +156 -0
- data/closure-library/closure/goog/ui/autocomplete/arraymatcher_test.html +130 -0
- data/closure-library/closure/goog/ui/autocomplete/autocomplete.js +627 -0
- data/closure-library/closure/goog/ui/autocomplete/autocomplete_test.html +537 -0
- data/closure-library/closure/goog/ui/autocomplete/basic.js +53 -0
- data/closure-library/closure/goog/ui/autocomplete/basic_test.html +204 -0
- data/closure-library/closure/goog/ui/autocomplete/inputhandler.js +1209 -0
- data/closure-library/closure/goog/ui/autocomplete/inputhandler_test.html +555 -0
- data/closure-library/closure/goog/ui/autocomplete/remote.js +117 -0
- data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher.js +273 -0
- data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher_test.html +73 -0
- data/closure-library/closure/goog/ui/autocomplete/renderer.js +852 -0
- data/closure-library/closure/goog/ui/autocomplete/renderer_test.html +386 -0
- data/closure-library/closure/goog/ui/autocomplete/richinputhandler.js +59 -0
- data/closure-library/closure/goog/ui/autocomplete/richremote.js +108 -0
- data/closure-library/closure/goog/ui/autocomplete/richremotearraymatcher.js +126 -0
- data/closure-library/closure/goog/ui/basicmenu.js +930 -0
- data/closure-library/closure/goog/ui/bidiinput.js +164 -0
- data/closure-library/closure/goog/ui/bubble.js +475 -0
- data/closure-library/closure/goog/ui/button.js +208 -0
- data/closure-library/closure/goog/ui/button_test.html +257 -0
- data/closure-library/closure/goog/ui/buttonrenderer.js +205 -0
- data/closure-library/closure/goog/ui/buttonrenderer_test.html +190 -0
- data/closure-library/closure/goog/ui/buttonside.js +40 -0
- data/closure-library/closure/goog/ui/cccbutton.js +281 -0
- data/closure-library/closure/goog/ui/charcounter.js +200 -0
- data/closure-library/closure/goog/ui/charpicker.js +807 -0
- data/closure-library/closure/goog/ui/checkbox.js +303 -0
- data/closure-library/closure/goog/ui/checkbox_test.html +224 -0
- data/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
- data/closure-library/closure/goog/ui/colorbutton.js +58 -0
- data/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
- data/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
- data/closure-library/closure/goog/ui/colormenubutton.js +213 -0
- data/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
- data/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
- data/closure-library/closure/goog/ui/colorpalette.js +162 -0
- data/closure-library/closure/goog/ui/colorpalette_test.html +169 -0
- data/closure-library/closure/goog/ui/colorpicker.js +344 -0
- data/closure-library/closure/goog/ui/colorsplitbehavior.js +61 -0
- data/closure-library/closure/goog/ui/combobox.js +894 -0
- data/closure-library/closure/goog/ui/combobox_test.html +208 -0
- data/closure-library/closure/goog/ui/component.js +1187 -0
- data/closure-library/closure/goog/ui/component_test.html +723 -0
- data/closure-library/closure/goog/ui/container.js +1296 -0
- data/closure-library/closure/goog/ui/container_test.html +450 -0
- data/closure-library/closure/goog/ui/containerrenderer.js +370 -0
- data/closure-library/closure/goog/ui/containerrenderer_test.html +227 -0
- data/closure-library/closure/goog/ui/containerscroller.js +221 -0
- data/closure-library/closure/goog/ui/containerscroller_test.html +213 -0
- data/closure-library/closure/goog/ui/control.js +1348 -0
- data/closure-library/closure/goog/ui/control_test.html +2128 -0
- data/closure-library/closure/goog/ui/controlcontent.js +28 -0
- data/closure-library/closure/goog/ui/controlrenderer.js +808 -0
- data/closure-library/closure/goog/ui/controlrenderer_test.html +840 -0
- data/closure-library/closure/goog/ui/cookieeditor.js +182 -0
- data/closure-library/closure/goog/ui/cookieeditor_test.html +102 -0
- data/closure-library/closure/goog/ui/css3buttonrenderer.js +147 -0
- data/closure-library/closure/goog/ui/css3menubuttonrenderer.js +144 -0
- data/closure-library/closure/goog/ui/cssnames.js +28 -0
- data/closure-library/closure/goog/ui/custombutton.js +58 -0
- data/closure-library/closure/goog/ui/custombuttonrenderer.js +254 -0
- data/closure-library/closure/goog/ui/customcolorpalette.js +137 -0
- data/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
- data/closure-library/closure/goog/ui/datepicker.js +1339 -0
- data/closure-library/closure/goog/ui/datepicker_test.html +190 -0
- data/closure-library/closure/goog/ui/decorate.js +37 -0
- data/closure-library/closure/goog/ui/decorate_test.html +113 -0
- data/closure-library/closure/goog/ui/deprecatedbutton.js +381 -0
- data/closure-library/closure/goog/ui/dialog.js +1776 -0
- data/closure-library/closure/goog/ui/dialog_test.html +493 -0
- data/closure-library/closure/goog/ui/dimensionpicker.js +289 -0
- data/closure-library/closure/goog/ui/dimensionpicker_test.html +128 -0
- data/closure-library/closure/goog/ui/dimensionpickerrenderer.js +387 -0
- data/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
- data/closure-library/closure/goog/ui/drilldownrow.js +494 -0
- data/closure-library/closure/goog/ui/editor/abstractdialog.js +443 -0
- data/closure-library/closure/goog/ui/editor/abstractdialog_test.html +467 -0
- data/closure-library/closure/goog/ui/editor/bubble.js +520 -0
- data/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
- data/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1062 -0
- data/closure-library/closure/goog/ui/editor/linkdialog.js +833 -0
- data/closure-library/closure/goog/ui/editor/linkdialog_test.html +449 -0
- data/closure-library/closure/goog/ui/editor/messages.js +115 -0
- data/closure-library/closure/goog/ui/editor/tabpane.js +183 -0
- data/closure-library/closure/goog/ui/editor/toolbarcontroller.js +293 -0
- data/closure-library/closure/goog/ui/editor/toolbarfactory.js +437 -0
- data/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
- data/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
- data/closure-library/closure/goog/ui/emoji/emojipalette.js +298 -0
- data/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +206 -0
- data/closure-library/closure/goog/ui/emoji/emojipicker.js +797 -0
- data/closure-library/closure/goog/ui/emoji/emojipicker_test.html +840 -0
- data/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
- data/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
- data/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
- data/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
- data/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +97 -0
- data/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
- data/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
- data/closure-library/closure/goog/ui/filteredmenu.js +562 -0
- data/closure-library/closure/goog/ui/filteredmenu_test.html +299 -0
- data/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
- data/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +60 -0
- data/closure-library/closure/goog/ui/flatbuttonrenderer.js +138 -0
- data/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +199 -0
- data/closure-library/closure/goog/ui/formpost.js +109 -0
- data/closure-library/closure/goog/ui/formpost_test.html +109 -0
- data/closure-library/closure/goog/ui/gauge.js +999 -0
- data/closure-library/closure/goog/ui/gaugetheme.js +169 -0
- data/closure-library/closure/goog/ui/hovercard.js +447 -0
- data/closure-library/closure/goog/ui/hovercard_test.html +343 -0
- data/closure-library/closure/goog/ui/hsvapalette.js +311 -0
- data/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
- data/closure-library/closure/goog/ui/hsvpalette.js +470 -0
- data/closure-library/closure/goog/ui/hsvpalette_test.html +202 -0
- data/closure-library/closure/goog/ui/idgenerator.js +57 -0
- data/closure-library/closure/goog/ui/idletimer.js +299 -0
- data/closure-library/closure/goog/ui/idletimer_test.html +100 -0
- data/closure-library/closure/goog/ui/iframemask.js +256 -0
- data/closure-library/closure/goog/ui/iframemask_test.html +230 -0
- data/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
- data/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +202 -0
- data/closure-library/closure/goog/ui/imagelessroundedcorner.js +971 -0
- data/closure-library/closure/goog/ui/inputdatepicker.js +306 -0
- data/closure-library/closure/goog/ui/inputdatepicker_test.html +109 -0
- data/closure-library/closure/goog/ui/itemevent.js +50 -0
- data/closure-library/closure/goog/ui/keyboardshortcuthandler.js +981 -0
- data/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +671 -0
- data/closure-library/closure/goog/ui/labelinput.js +439 -0
- data/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
- data/closure-library/closure/goog/ui/media/flashobject.js +629 -0
- data/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
- data/closure-library/closure/goog/ui/media/flickr.js +309 -0
- data/closure-library/closure/goog/ui/media/flickr_test.html +90 -0
- data/closure-library/closure/goog/ui/media/media.js +284 -0
- data/closure-library/closure/goog/ui/media/media_test.html +161 -0
- data/closure-library/closure/goog/ui/media/mediamodel.js +840 -0
- data/closure-library/closure/goog/ui/media/mp3.js +225 -0
- data/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
- data/closure-library/closure/goog/ui/media/photo.js +139 -0
- data/closure-library/closure/goog/ui/media/photo_test.html +62 -0
- data/closure-library/closure/goog/ui/media/picasa.js +317 -0
- data/closure-library/closure/goog/ui/media/picasa_test.html +131 -0
- data/closure-library/closure/goog/ui/media/vimeo.js +264 -0
- data/closure-library/closure/goog/ui/media/vimeo_test.html +79 -0
- data/closure-library/closure/goog/ui/media/youtube.js +328 -0
- data/closure-library/closure/goog/ui/media/youtube_test.html +185 -0
- data/closure-library/closure/goog/ui/menu.js +435 -0
- data/closure-library/closure/goog/ui/menu_test.html +129 -0
- data/closure-library/closure/goog/ui/menubase.js +191 -0
- data/closure-library/closure/goog/ui/menubutton.js +809 -0
- data/closure-library/closure/goog/ui/menubutton_test.html +440 -0
- data/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
- data/closure-library/closure/goog/ui/menubuttonrenderer.js +226 -0
- data/closure-library/closure/goog/ui/menubuttonrenderer_test.html +161 -0
- data/closure-library/closure/goog/ui/menuheader.js +62 -0
- data/closure-library/closure/goog/ui/menuheaderrenderer.js +55 -0
- data/closure-library/closure/goog/ui/menuitem.js +154 -0
- data/closure-library/closure/goog/ui/menuitem_test.html +506 -0
- data/closure-library/closure/goog/ui/menuitemrenderer.js +353 -0
- data/closure-library/closure/goog/ui/menuitemrenderer_test.html +190 -0
- data/closure-library/closure/goog/ui/menurenderer.js +118 -0
- data/closure-library/closure/goog/ui/menuseparator.js +51 -0
- data/closure-library/closure/goog/ui/menuseparatorrenderer.js +102 -0
- data/closure-library/closure/goog/ui/mockactivitymonitor.js +54 -0
- data/closure-library/closure/goog/ui/nativebuttonrenderer.js +205 -0
- data/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +213 -0
- data/closure-library/closure/goog/ui/offlineinstalldialog.js +1086 -0
- data/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
- data/closure-library/closure/goog/ui/offlinestatuscomponent.js +545 -0
- data/closure-library/closure/goog/ui/option.js +67 -0
- data/closure-library/closure/goog/ui/palette.js +528 -0
- data/closure-library/closure/goog/ui/paletterenderer.js +318 -0
- data/closure-library/closure/goog/ui/plaintextspellchecker.js +668 -0
- data/closure-library/closure/goog/ui/plaintextspellchecker_test.html +240 -0
- data/closure-library/closure/goog/ui/popup.js +410 -0
- data/closure-library/closure/goog/ui/popup_test.html +137 -0
- data/closure-library/closure/goog/ui/popupbase.js +721 -0
- data/closure-library/closure/goog/ui/popupbase_test.html +186 -0
- data/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
- data/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
- data/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
- data/closure-library/closure/goog/ui/popupmenu.js +539 -0
- data/closure-library/closure/goog/ui/popupmenu_test.html +197 -0
- data/closure-library/closure/goog/ui/progressbar.js +390 -0
- data/closure-library/closure/goog/ui/prompt.js +307 -0
- data/closure-library/closure/goog/ui/prompt_test.html +65 -0
- data/closure-library/closure/goog/ui/rangemodel.js +301 -0
- data/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
- data/closure-library/closure/goog/ui/ratings.js +441 -0
- data/closure-library/closure/goog/ui/registry.js +166 -0
- data/closure-library/closure/goog/ui/registry_test.html +236 -0
- data/closure-library/closure/goog/ui/richtextspellchecker.js +600 -0
- data/closure-library/closure/goog/ui/richtextspellchecker_test.html +224 -0
- data/closure-library/closure/goog/ui/roundedcorners.js +694 -0
- data/closure-library/closure/goog/ui/roundedpanel.js +609 -0
- data/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
- data/closure-library/closure/goog/ui/roundedtabrenderer.js +196 -0
- data/closure-library/closure/goog/ui/scrollfloater.js +394 -0
- data/closure-library/closure/goog/ui/scrollfloater_test.html +46 -0
- data/closure-library/closure/goog/ui/select.js +397 -0
- data/closure-library/closure/goog/ui/select_test.html +152 -0
- data/closure-library/closure/goog/ui/selectionmenubutton.js +277 -0
- data/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
- data/closure-library/closure/goog/ui/selectionmodel.js +291 -0
- data/closure-library/closure/goog/ui/separator.js +74 -0
- data/closure-library/closure/goog/ui/serverchart.js +1791 -0
- data/closure-library/closure/goog/ui/serverchart_test.html +598 -0
- data/closure-library/closure/goog/ui/slider.js +125 -0
- data/closure-library/closure/goog/ui/sliderbase.js +1087 -0
- data/closure-library/closure/goog/ui/sliderbase_test.html +198 -0
- data/closure-library/closure/goog/ui/splitbehavior.js +348 -0
- data/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
- data/closure-library/closure/goog/ui/splitpane.js +844 -0
- data/closure-library/closure/goog/ui/splitpane_test.html +143 -0
- data/closure-library/closure/goog/ui/style/app/buttonrenderer.js +204 -0
- data/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
- data/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +227 -0
- data/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
- data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
- data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
- data/closure-library/closure/goog/ui/submenu.js +660 -0
- data/closure-library/closure/goog/ui/submenu_test.html +446 -0
- data/closure-library/closure/goog/ui/submenurenderer.js +188 -0
- data/closure-library/closure/goog/ui/tab.js +102 -0
- data/closure-library/closure/goog/ui/tab_test.html +61 -0
- data/closure-library/closure/goog/ui/tabbar.js +393 -0
- data/closure-library/closure/goog/ui/tabbar_test.html +611 -0
- data/closure-library/closure/goog/ui/tabbarrenderer.js +173 -0
- data/closure-library/closure/goog/ui/tabbarrenderer_test.html +137 -0
- data/closure-library/closure/goog/ui/tablesorter.js +304 -0
- data/closure-library/closure/goog/ui/tablesorter_test.html +127 -0
- data/closure-library/closure/goog/ui/tabpane.js +674 -0
- data/closure-library/closure/goog/ui/tabpane_test.html +107 -0
- data/closure-library/closure/goog/ui/tabrenderer.js +152 -0
- data/closure-library/closure/goog/ui/tabrenderer_test.html +132 -0
- data/closure-library/closure/goog/ui/textarea.js +573 -0
- data/closure-library/closure/goog/ui/textarea_test.html +305 -0
- data/closure-library/closure/goog/ui/textarearenderer.js +167 -0
- data/closure-library/closure/goog/ui/togglebutton.js +58 -0
- data/closure-library/closure/goog/ui/toolbar.js +45 -0
- data/closure-library/closure/goog/ui/toolbarbutton.js +54 -0
- data/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +55 -0
- data/closure-library/closure/goog/ui/toolbarcolormenubutton.js +57 -0
- data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +95 -0
- data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
- data/closure-library/closure/goog/ui/toolbarmenubutton.js +56 -0
- data/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +55 -0
- data/closure-library/closure/goog/ui/toolbarrenderer.js +95 -0
- data/closure-library/closure/goog/ui/toolbarselect.js +55 -0
- data/closure-library/closure/goog/ui/toolbarseparator.js +51 -0
- data/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +87 -0
- data/closure-library/closure/goog/ui/toolbartogglebutton.js +53 -0
- data/closure-library/closure/goog/ui/tooltip.js +975 -0
- data/closure-library/closure/goog/ui/tooltip_test.html +351 -0
- data/closure-library/closure/goog/ui/tree/basenode.js +1457 -0
- data/closure-library/closure/goog/ui/tree/basenode_test.html +218 -0
- data/closure-library/closure/goog/ui/tree/treecontrol.js +656 -0
- data/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
- data/closure-library/closure/goog/ui/tree/treenode.js +102 -0
- data/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
- data/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
- data/closure-library/closure/goog/ui/tristatemenuitem.js +185 -0
- data/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +86 -0
- data/closure-library/closure/goog/ui/twothumbslider.js +134 -0
- data/closure-library/closure/goog/ui/zippy.js +277 -0
- data/closure-library/closure/goog/ui/zippy_test.html +223 -0
- data/closure-library/closure/goog/uri/uri.js +1595 -0
- data/closure-library/closure/goog/uri/uri_test.html +837 -0
- data/closure-library/closure/goog/uri/utils.js +972 -0
- data/closure-library/closure/goog/uri/utils_test.html +521 -0
- data/closure-library/closure/goog/useragent/adobereader.js +90 -0
- data/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
- data/closure-library/closure/goog/useragent/flash.js +113 -0
- data/closure-library/closure/goog/useragent/flash_test.html +34 -0
- data/closure-library/closure/goog/useragent/iphoto.js +86 -0
- data/closure-library/closure/goog/useragent/jscript.js +94 -0
- data/closure-library/closure/goog/useragent/jscript_test.html +65 -0
- data/closure-library/closure/goog/useragent/picasa.js +111 -0
- data/closure-library/closure/goog/useragent/platform.js +70 -0
- data/closure-library/closure/goog/useragent/platform_test.html +108 -0
- data/closure-library/closure/goog/useragent/product.js +253 -0
- data/closure-library/closure/goog/useragent/product_isversion.js +99 -0
- data/closure-library/closure/goog/useragent/product_test.html +322 -0
- data/closure-library/closure/goog/useragent/useragent.js +464 -0
- data/closure-library/closure/goog/useragent/useragent_test.html +290 -0
- data/closure-library/closure/goog/window/window.js +206 -0
- data/closure-library/closure/goog/window/window_test.html +185 -0
- data/closure-library/third_party/closure/goog/base.js +2 -0
- data/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
- data/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
- data/closure-library/third_party/closure/goog/deps.js +26 -0
- data/closure-library/third_party/closure/goog/dojo/dom/query.js +1532 -0
- data/closure-library/third_party/closure/goog/dojo/dom/query_test.html +63 -0
- data/closure-library/third_party/closure/goog/dojo/dom/query_test.js +160 -0
- data/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
- data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
- data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +61 -0
- data/closure-library/third_party/closure/goog/mochikit/async/deferred.js +530 -0
- data/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +627 -0
- data/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +199 -0
- data/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +426 -0
- data/closure-library/third_party/closure/goog/osapi/osapi.js +91 -0
- data/closure-library/third_party/closure/goog/silverlight/AppManifest.xml +6 -0
- data/closure-library/third_party/closure/goog/silverlight/AssemblyInfo.cs +35 -0
- data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml +9 -0
- data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml.cs +74 -0
- data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml +8 -0
- data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml.cs +75 -0
- data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj +108 -0
- data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj.user +29 -0
- data/closure-library/third_party/closure/goog/silverlight/clipboardbutton.js +279 -0
- data/closure-library/third_party/closure/goog/silverlight/silverlight.js +758 -0
- data/closure-library/third_party/closure/goog/silverlight/supporteduseragent.js +138 -0
- data/closure-library/third_party/closure/goog/silverlight/xap_files +0 -0
- data/closure-templates/COPYING +202 -0
- data/closure-templates/README +47 -0
- data/closure-templates/SoyToJsSrcCompiler.jar +0 -0
- data/closure-templates/soyutils.js +880 -0
- data/closure-templates/soyutils_usegoog.js +308 -0
- data/closure.gemspec +20 -0
- data/config.ru +40 -0
- data/java_src/ClosureScript.java +89 -0
- data/java_src/make.rb +19 -0
- data/lib/closure/beanshell.rb +80 -0
- data/lib/closure/compiler.rb +184 -0
- data/lib/closure/file_response.rb +90 -0
- data/lib/closure/goog.rb +143 -0
- data/lib/closure/middleware.rb +43 -0
- data/lib/closure/sass.rb +56 -0
- data/lib/closure/script.rb +139 -0
- data/lib/closure/server.rb +83 -0
- data/lib/closure/sources.rb +310 -0
- data/lib/closure/templates.rb +156 -0
- data/lib/closure/version.rb +20 -0
- data/lib/closure.jar +0 -0
- data/lib/closure.rb +134 -0
- data/scripts/demos/compile.js.erb +8 -0
- data/scripts/demos/compile.out +1 -0
- data/scripts/demos/compiler.haml +17 -0
- data/scripts/demos/compiler.js +12 -0
- data/scripts/demos/deps.js.erb +1 -0
- data/scripts/demos/externs.haml +16 -0
- data/scripts/demos/externs.js.erb +8 -0
- data/scripts/demos/externs.out +1 -0
- data/scripts/demos/externs_jquery.externs +849 -0
- data/scripts/demos/externs_jquery.js +167 -0
- data/scripts/demos/externs_jquerytest.js +11 -0
- data/scripts/demos/helloworld.haml +15 -0
- data/scripts/demos/helloworld.js +58 -0
- data/scripts/demos/helloworld.soy +45 -0
- data/scripts/demos/index.haml +21 -0
- data/scripts/demos/rails_ujs.haml +24 -0
- data/scripts/examples/rails/ujs.js +136 -0
- data/scripts/favicon.ico +0 -0
- data/scripts/fixtures/_partial.haml +2 -0
- data/scripts/fixtures/erb.html.erb +8 -0
- data/scripts/fixtures/haml.haml +6 -0
- data/scripts/fixtures/html.html +9 -0
- data/scripts/fixtures/route_js.js.erb +1 -0
- data/scripts/index.haml +14 -0
- data/test/beanshell_test.rb +22 -0
- data/test/server_test.rb +67 -0
- data/test/sources_test.rb +41 -0
- data/test/test_helper.rb +12 -0
- metadata +1577 -0
|
@@ -0,0 +1,1348 @@
|
|
|
1
|
+
// Copyright 2007 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 Base class for UI controls such as buttons, menus, menu items,
|
|
17
|
+
* toolbar buttons, etc. The implementation is based on a generalized version
|
|
18
|
+
* of {@link goog.ui.MenuItem}.
|
|
19
|
+
* TODO(user): If the renderer framework works well, pull it into Component.
|
|
20
|
+
*
|
|
21
|
+
* @see ../demos/control.html
|
|
22
|
+
* @see http://code.google.com/p/closure-library/wiki/IntroToControls
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
goog.provide('goog.ui.Control');
|
|
26
|
+
|
|
27
|
+
goog.require('goog.array');
|
|
28
|
+
goog.require('goog.dom');
|
|
29
|
+
goog.require('goog.events.BrowserEvent.MouseButton');
|
|
30
|
+
goog.require('goog.events.Event');
|
|
31
|
+
goog.require('goog.events.EventType');
|
|
32
|
+
goog.require('goog.events.KeyCodes');
|
|
33
|
+
goog.require('goog.events.KeyHandler');
|
|
34
|
+
goog.require('goog.events.KeyHandler.EventType');
|
|
35
|
+
goog.require('goog.string');
|
|
36
|
+
goog.require('goog.ui.Component');
|
|
37
|
+
goog.require('goog.ui.Component.Error');
|
|
38
|
+
goog.require('goog.ui.Component.EventType');
|
|
39
|
+
goog.require('goog.ui.Component.State');
|
|
40
|
+
goog.require('goog.ui.ControlContent');
|
|
41
|
+
goog.require('goog.ui.ControlRenderer');
|
|
42
|
+
goog.require('goog.ui.decorate');
|
|
43
|
+
goog.require('goog.ui.registry');
|
|
44
|
+
goog.require('goog.userAgent');
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Base class for UI controls. Extends {@link goog.ui.Component} by adding
|
|
50
|
+
* the following:
|
|
51
|
+
* <ul>
|
|
52
|
+
* <li>a {@link goog.events.KeyHandler}, to simplify keyboard handling,
|
|
53
|
+
* <li>a pluggable <em>renderer</em> framework, to simplify the creation of
|
|
54
|
+
* simple controls without the need to subclass this class,
|
|
55
|
+
* <li>the notion of component <em>content</em>, like a text caption or DOM
|
|
56
|
+
* structure displayed in the component (e.g. a button label),
|
|
57
|
+
* <li>getter and setter for component content, as well as a getter and
|
|
58
|
+
* setter specifically for caption text (for convenience),
|
|
59
|
+
* <li>support for hiding/showing the component,
|
|
60
|
+
<li>fine-grained control over supported states and state transition
|
|
61
|
+
events, and
|
|
62
|
+
* <li>default mouse and keyboard event handling.
|
|
63
|
+
* </ul>
|
|
64
|
+
* This class has sufficient built-in functionality for most simple UI controls.
|
|
65
|
+
* All controls dispatch SHOW, HIDE, ENTER, LEAVE, and ACTION events on show,
|
|
66
|
+
* hide, mouseover, mouseout, and user action, respectively. Additional states
|
|
67
|
+
* are also supported. See closure/demos/control.html
|
|
68
|
+
* for example usage.
|
|
69
|
+
* @param {goog.ui.ControlContent} content Text caption or DOM structure
|
|
70
|
+
* to display as the content of the component (if any).
|
|
71
|
+
* @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or
|
|
72
|
+
* decorate the component; defaults to {@link goog.ui.ControlRenderer}.
|
|
73
|
+
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
|
|
74
|
+
* document interaction.
|
|
75
|
+
* @constructor
|
|
76
|
+
* @extends {goog.ui.Component}
|
|
77
|
+
*/
|
|
78
|
+
goog.ui.Control = function(content, opt_renderer, opt_domHelper) {
|
|
79
|
+
goog.ui.Component.call(this, opt_domHelper);
|
|
80
|
+
this.renderer_ = opt_renderer ||
|
|
81
|
+
goog.ui.registry.getDefaultRenderer(this.constructor);
|
|
82
|
+
this.setContentInternal(content);
|
|
83
|
+
};
|
|
84
|
+
goog.inherits(goog.ui.Control, goog.ui.Component);
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
// Renderer registry.
|
|
88
|
+
// TODO(user): Refactor existing usages inside Google in a follow-up CL.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Maps a CSS class name to a function that returns a new instance of
|
|
93
|
+
* {@link goog.ui.Control} or a subclass thereof, suitable to decorate
|
|
94
|
+
* an element that has the specified CSS class. UI components that extend
|
|
95
|
+
* {@link goog.ui.Control} and want {@link goog.ui.Container}s to be able
|
|
96
|
+
* to discover and decorate elements using them should register a factory
|
|
97
|
+
* function via this API.
|
|
98
|
+
* @param {string} className CSS class name.
|
|
99
|
+
* @param {Function} decoratorFunction Function that takes no arguments and
|
|
100
|
+
* returns a new instance of a control to decorate an element with the
|
|
101
|
+
* given class.
|
|
102
|
+
* @deprecated Use {@link goog.ui.registry.setDecoratorByClassName} instead.
|
|
103
|
+
*/
|
|
104
|
+
goog.ui.Control.registerDecorator = goog.ui.registry.setDecoratorByClassName;
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Takes an element and returns a new instance of {@link goog.ui.Control}
|
|
109
|
+
* or a subclass, suitable to decorate it (based on the element's CSS class).
|
|
110
|
+
* @param {Element} element Element to decorate.
|
|
111
|
+
* @return {goog.ui.Control?} New control instance to decorate the element
|
|
112
|
+
* (null if none).
|
|
113
|
+
* @deprecated Use {@link goog.ui.registry.getDecorator} instead.
|
|
114
|
+
*/
|
|
115
|
+
goog.ui.Control.getDecorator =
|
|
116
|
+
/** @type {function(Element): goog.ui.Control} */ (
|
|
117
|
+
goog.ui.registry.getDecorator);
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Takes an element, and decorates it with a {@link goog.ui.Control} instance
|
|
122
|
+
* if a suitable decorator is found.
|
|
123
|
+
* @param {Element} element Element to decorate.
|
|
124
|
+
* @return {goog.ui.Control?} New control instance that decorates the element
|
|
125
|
+
* (null if none).
|
|
126
|
+
* @deprecated Use {@link goog.ui.decorate} instead.
|
|
127
|
+
*/
|
|
128
|
+
goog.ui.Control.decorate = /** @type {function(Element): goog.ui.Control} */ (
|
|
129
|
+
goog.ui.decorate);
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Renderer associated with the component.
|
|
134
|
+
* @type {goog.ui.ControlRenderer|undefined}
|
|
135
|
+
* @private
|
|
136
|
+
*/
|
|
137
|
+
goog.ui.Control.prototype.renderer_;
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Text caption or DOM structure displayed in the component.
|
|
142
|
+
* @type {goog.ui.ControlContent}
|
|
143
|
+
* @private
|
|
144
|
+
*/
|
|
145
|
+
goog.ui.Control.prototype.content_ = null;
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Current component state; a bit mask of {@link goog.ui.Component.State}s.
|
|
150
|
+
* @type {number}
|
|
151
|
+
* @private
|
|
152
|
+
*/
|
|
153
|
+
goog.ui.Control.prototype.state_ = 0x00;
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* A bit mask of {@link goog.ui.Component.State}s this component supports.
|
|
158
|
+
* @type {number}
|
|
159
|
+
* @private
|
|
160
|
+
*/
|
|
161
|
+
goog.ui.Control.prototype.supportedStates_ =
|
|
162
|
+
goog.ui.Component.State.DISABLED |
|
|
163
|
+
goog.ui.Component.State.HOVER |
|
|
164
|
+
goog.ui.Component.State.ACTIVE |
|
|
165
|
+
goog.ui.Component.State.FOCUSED;
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* A bit mask of {@link goog.ui.Component.State}s for which this component
|
|
170
|
+
* provides default event handling. For example, a component that handles
|
|
171
|
+
* the HOVER state automatically will highlight itself on mouseover, whereas
|
|
172
|
+
* a component that doesn't handle HOVER automatically will only dispatch
|
|
173
|
+
* ENTER and LEAVE events but not call {@link setHighlighted} on itself.
|
|
174
|
+
* By default, components provide default event handling for all states.
|
|
175
|
+
* Controls hosted in containers (e.g. menu items in a menu, or buttons in a
|
|
176
|
+
* toolbar) will typically want to have their container manage their highlight
|
|
177
|
+
* state. Selectable controls managed by a selection model will also typically
|
|
178
|
+
* want their selection state to be managed by the model.
|
|
179
|
+
* @type {number}
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
goog.ui.Control.prototype.autoStates_ = goog.ui.Component.State.ALL;
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* A bit mask of {@link goog.ui.Component.State}s for which this component
|
|
187
|
+
* dispatches state transition events. Because events are expensive, the
|
|
188
|
+
* default behavior is to not dispatch any state transition events at all.
|
|
189
|
+
* Use the {@link #setDispatchTransitionEvents} API to request transition
|
|
190
|
+
* events as needed. Subclasses may enable transition events by default.
|
|
191
|
+
* Controls hosted in containers or managed by a selection model will typically
|
|
192
|
+
* want to dispatch transition events.
|
|
193
|
+
* @type {number}
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
goog.ui.Control.prototype.statesWithTransitionEvents_ = 0x00;
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Component visibility.
|
|
201
|
+
* @type {boolean}
|
|
202
|
+
* @private
|
|
203
|
+
*/
|
|
204
|
+
goog.ui.Control.prototype.visible_ = true;
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Keyboard event handler.
|
|
209
|
+
* @type {goog.events.KeyHandler}
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
goog.ui.Control.prototype.keyHandler_;
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Additional class name(s) to apply to the control's root element, if any.
|
|
217
|
+
* @type {Array.<string>?}
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
goog.ui.Control.prototype.extraClassNames_ = null;
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Whether the control should listen for and handle mouse events; defaults to
|
|
225
|
+
* true.
|
|
226
|
+
* @type {boolean}
|
|
227
|
+
* @private
|
|
228
|
+
*/
|
|
229
|
+
goog.ui.Control.prototype.handleMouseEvents_ = true;
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Whether the control allows text selection within its DOM. Defaults to false.
|
|
234
|
+
* @type {boolean}
|
|
235
|
+
* @private
|
|
236
|
+
*/
|
|
237
|
+
goog.ui.Control.prototype.allowTextSelection_ = false;
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
// Event handler and renderer management.
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Returns true if the control is configured to handle its own mouse events,
|
|
245
|
+
* false otherwise. Controls not hosted in {@link goog.ui.Container}s have
|
|
246
|
+
* to handle their own mouse events, but controls hosted in containers may
|
|
247
|
+
* allow their parent to handle mouse events on their behalf. Considered
|
|
248
|
+
* protected; should only be used within this package and by subclasses.
|
|
249
|
+
* @return {boolean} Whether the control handles its own mouse events.
|
|
250
|
+
*/
|
|
251
|
+
goog.ui.Control.prototype.isHandleMouseEvents = function() {
|
|
252
|
+
return this.handleMouseEvents_;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Enables or disables mouse event handling for the control. Containers may
|
|
258
|
+
* use this method to disable mouse event handling in their child controls.
|
|
259
|
+
* Considered protected; should only be used within this package and by
|
|
260
|
+
* subclasses.
|
|
261
|
+
* @param {boolean} enable Whether to enable or disable mouse event handling.
|
|
262
|
+
*/
|
|
263
|
+
goog.ui.Control.prototype.setHandleMouseEvents = function(enable) {
|
|
264
|
+
if (this.isInDocument() && enable != this.handleMouseEvents_) {
|
|
265
|
+
// Already in the document; need to update event handler.
|
|
266
|
+
this.enableMouseEventHandling_(enable);
|
|
267
|
+
}
|
|
268
|
+
this.handleMouseEvents_ = enable;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Returns the DOM element on which the control is listening for keyboard
|
|
274
|
+
* events (null if none).
|
|
275
|
+
* @return {Element} Element on which the control is listening for key
|
|
276
|
+
* events.
|
|
277
|
+
*/
|
|
278
|
+
goog.ui.Control.prototype.getKeyEventTarget = function() {
|
|
279
|
+
// Delegate to renderer.
|
|
280
|
+
return this.renderer_.getKeyEventTarget(this);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Returns the keyboard event handler for this component, lazily created the
|
|
286
|
+
* first time this method is called. Considered protected; should only be
|
|
287
|
+
* used within this package and by subclasses.
|
|
288
|
+
* @return {goog.events.KeyHandler} Keyboard event handler for this component.
|
|
289
|
+
* @protected
|
|
290
|
+
*/
|
|
291
|
+
goog.ui.Control.prototype.getKeyHandler = function() {
|
|
292
|
+
return this.keyHandler_ || (this.keyHandler_ = new goog.events.KeyHandler());
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Returns the renderer used by this component to render itself or to decorate
|
|
298
|
+
* an existing element.
|
|
299
|
+
* @return {goog.ui.ControlRenderer|undefined} Renderer used by the component
|
|
300
|
+
* (undefined if none).
|
|
301
|
+
*/
|
|
302
|
+
goog.ui.Control.prototype.getRenderer = function() {
|
|
303
|
+
return this.renderer_;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Registers the given renderer with the component. Changing renderers after
|
|
309
|
+
* the component has entered the document is an error.
|
|
310
|
+
* @param {goog.ui.ControlRenderer} renderer Renderer used by the component.
|
|
311
|
+
* @throws {Error} If the control is already in the document.
|
|
312
|
+
*/
|
|
313
|
+
goog.ui.Control.prototype.setRenderer = function(renderer) {
|
|
314
|
+
if (this.isInDocument()) {
|
|
315
|
+
// Too late.
|
|
316
|
+
throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (this.getElement()) {
|
|
320
|
+
// The component has already been rendered, but isn't yet in the document.
|
|
321
|
+
// Replace the renderer and delete the current DOM, so it can be re-rendered
|
|
322
|
+
// using the new renderer the next time someone calls render().
|
|
323
|
+
this.setElementInternal(null);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
this.renderer_ = renderer;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
// Support for additional styling.
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Returns any additional class name(s) to be applied to the component's
|
|
335
|
+
* root element, or null if no extra class names are needed.
|
|
336
|
+
* @return {Array.<string>?} Additional class names to be applied to
|
|
337
|
+
* the component's root element (null if none).
|
|
338
|
+
*/
|
|
339
|
+
goog.ui.Control.prototype.getExtraClassNames = function() {
|
|
340
|
+
return this.extraClassNames_;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Adds the given class name to the list of classes to be applied to the
|
|
346
|
+
* component's root element.
|
|
347
|
+
* @param {string} className Additional class name to be applied to the
|
|
348
|
+
* component's root element.
|
|
349
|
+
*/
|
|
350
|
+
goog.ui.Control.prototype.addClassName = function(className) {
|
|
351
|
+
if (className) {
|
|
352
|
+
if (this.extraClassNames_) {
|
|
353
|
+
if (!goog.array.contains(this.extraClassNames_, className)) {
|
|
354
|
+
this.extraClassNames_.push(className);
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
this.extraClassNames_ = [className];
|
|
358
|
+
}
|
|
359
|
+
this.renderer_.enableExtraClassName(this, className, true);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Removes the given class name from the list of classes to be applied to
|
|
366
|
+
* the component's root element.
|
|
367
|
+
* @param {string} className Class name to be removed from the component's root
|
|
368
|
+
* element.
|
|
369
|
+
*/
|
|
370
|
+
goog.ui.Control.prototype.removeClassName = function(className) {
|
|
371
|
+
if (className && this.extraClassNames_) {
|
|
372
|
+
goog.array.remove(this.extraClassNames_, className);
|
|
373
|
+
if (this.extraClassNames_.length == 0) {
|
|
374
|
+
this.extraClassNames_ = null;
|
|
375
|
+
}
|
|
376
|
+
this.renderer_.enableExtraClassName(this, className, false);
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Adds or removes the given class name to/from the list of classes to be
|
|
383
|
+
* applied to the component's root element.
|
|
384
|
+
* @param {string} className CSS class name to add or remove.
|
|
385
|
+
* @param {boolean} enable Whether to add or remove the class name.
|
|
386
|
+
*/
|
|
387
|
+
goog.ui.Control.prototype.enableClassName = function(className, enable) {
|
|
388
|
+
if (enable) {
|
|
389
|
+
this.addClassName(className);
|
|
390
|
+
} else {
|
|
391
|
+
this.removeClassName(className);
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
// Standard goog.ui.Component implementation.
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Creates the control's DOM. Overrides {@link goog.ui.Component#createDom} by
|
|
401
|
+
* delegating DOM manipulation to the control's renderer.
|
|
402
|
+
* @override
|
|
403
|
+
*/
|
|
404
|
+
goog.ui.Control.prototype.createDom = function() {
|
|
405
|
+
var element = this.renderer_.createDom(this);
|
|
406
|
+
this.setElementInternal(element);
|
|
407
|
+
|
|
408
|
+
// Initialize ARIA role.
|
|
409
|
+
this.renderer_.setAriaRole(element);
|
|
410
|
+
|
|
411
|
+
// Initialize text selection.
|
|
412
|
+
if (!this.isAllowTextSelection()) {
|
|
413
|
+
// The renderer is assumed to create selectable elements. Since making
|
|
414
|
+
// elements unselectable is expensive, only do it if needed (bug 1037090).
|
|
415
|
+
this.renderer_.setAllowTextSelection(element, false);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Initialize visibility.
|
|
419
|
+
if (!this.isVisible()) {
|
|
420
|
+
// The renderer is assumed to create visible elements. Since hiding
|
|
421
|
+
// elements can be expensive, only do it if needed (bug 1037105).
|
|
422
|
+
this.renderer_.setVisible(element, false);
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Returns the DOM element into which child components are to be rendered,
|
|
429
|
+
* or null if the control itself hasn't been rendered yet. Overrides
|
|
430
|
+
* {@link goog.ui.Component#getContentElement} by delegating to the renderer.
|
|
431
|
+
* @return {Element} Element to contain child elements (null if none).
|
|
432
|
+
*/
|
|
433
|
+
goog.ui.Control.prototype.getContentElement = function() {
|
|
434
|
+
// Delegate to renderer.
|
|
435
|
+
return this.renderer_.getContentElement(this.getElement());
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Returns true if the given element can be decorated by this component.
|
|
441
|
+
* Overrides {@link goog.ui.Component#canDecorate}.
|
|
442
|
+
* @param {Element} element Element to decorate.
|
|
443
|
+
* @return {boolean} Whether the element can be decorated by this component.
|
|
444
|
+
*/
|
|
445
|
+
goog.ui.Control.prototype.canDecorate = function(element) {
|
|
446
|
+
// Controls support pluggable renderers; delegate to the renderer.
|
|
447
|
+
return this.renderer_.canDecorate(element);
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Decorates the given element with this component. Overrides {@link
|
|
453
|
+
* goog.ui.Component#decorateInternal} by delegating DOM manipulation
|
|
454
|
+
* to the control's renderer.
|
|
455
|
+
* @param {Element} element Element to decorate.
|
|
456
|
+
* @protected
|
|
457
|
+
* @override
|
|
458
|
+
*/
|
|
459
|
+
goog.ui.Control.prototype.decorateInternal = function(element) {
|
|
460
|
+
element = this.renderer_.decorate(this, element);
|
|
461
|
+
this.setElementInternal(element);
|
|
462
|
+
|
|
463
|
+
// Initialize ARIA role.
|
|
464
|
+
this.renderer_.setAriaRole(element);
|
|
465
|
+
|
|
466
|
+
// Initialize text selection.
|
|
467
|
+
if (!this.isAllowTextSelection()) {
|
|
468
|
+
// Decorated elements are assumed to be selectable. Since making elements
|
|
469
|
+
// unselectable is expensive, only do it if needed (bug 1037090).
|
|
470
|
+
this.renderer_.setAllowTextSelection(element, false);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// Initialize visibility based on the decorated element's styling.
|
|
474
|
+
this.visible_ = element.style.display != 'none';
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Configures the component after its DOM has been rendered, and sets up event
|
|
480
|
+
* handling. Overrides {@link goog.ui.Component#enterDocument}.
|
|
481
|
+
* @override
|
|
482
|
+
*/
|
|
483
|
+
goog.ui.Control.prototype.enterDocument = function() {
|
|
484
|
+
goog.ui.Control.superClass_.enterDocument.call(this);
|
|
485
|
+
|
|
486
|
+
// Call the renderer's initializeDom method to configure properties of the
|
|
487
|
+
// control's DOM that can only be done once it's in the document.
|
|
488
|
+
this.renderer_.initializeDom(this);
|
|
489
|
+
|
|
490
|
+
// Initialize event handling if at least one state other than DISABLED is
|
|
491
|
+
// supported.
|
|
492
|
+
if (this.supportedStates_ & ~goog.ui.Component.State.DISABLED) {
|
|
493
|
+
// Initialize mouse event handling if the control is configured to handle
|
|
494
|
+
// its own mouse events. (Controls hosted in containers don't need to
|
|
495
|
+
// handle their own mouse events.)
|
|
496
|
+
if (this.isHandleMouseEvents()) {
|
|
497
|
+
this.enableMouseEventHandling_(true);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// Initialize keyboard event handling if the control is focusable and has
|
|
501
|
+
// a key event target. (Controls hosted in containers typically aren't
|
|
502
|
+
// focusable, allowing their container to handle keyboard events for them.)
|
|
503
|
+
if (this.isSupportedState(goog.ui.Component.State.FOCUSED)) {
|
|
504
|
+
var keyTarget = this.getKeyEventTarget();
|
|
505
|
+
if (keyTarget) {
|
|
506
|
+
var keyHandler = this.getKeyHandler();
|
|
507
|
+
keyHandler.attach(keyTarget);
|
|
508
|
+
this.getHandler().
|
|
509
|
+
listen(keyHandler, goog.events.KeyHandler.EventType.KEY,
|
|
510
|
+
this.handleKeyEvent).
|
|
511
|
+
listen(keyTarget, goog.events.EventType.FOCUS,
|
|
512
|
+
this.handleFocus).
|
|
513
|
+
listen(keyTarget, goog.events.EventType.BLUR,
|
|
514
|
+
this.handleBlur);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Enables or disables mouse event handling on the control.
|
|
523
|
+
* @param {boolean} enable Whether to enable mouse event handling.
|
|
524
|
+
* @private
|
|
525
|
+
*/
|
|
526
|
+
goog.ui.Control.prototype.enableMouseEventHandling_ = function(enable) {
|
|
527
|
+
var handler = this.getHandler();
|
|
528
|
+
var element = this.getElement();
|
|
529
|
+
if (enable) {
|
|
530
|
+
handler.
|
|
531
|
+
listen(element, goog.events.EventType.MOUSEOVER, this.handleMouseOver).
|
|
532
|
+
listen(element, goog.events.EventType.MOUSEDOWN, this.handleMouseDown).
|
|
533
|
+
listen(element, goog.events.EventType.MOUSEUP, this.handleMouseUp).
|
|
534
|
+
listen(element, goog.events.EventType.MOUSEOUT, this.handleMouseOut);
|
|
535
|
+
if (goog.userAgent.IE) {
|
|
536
|
+
handler.listen(element, goog.events.EventType.DBLCLICK,
|
|
537
|
+
this.handleDblClick);
|
|
538
|
+
}
|
|
539
|
+
} else {
|
|
540
|
+
handler.
|
|
541
|
+
unlisten(element, goog.events.EventType.MOUSEOVER,
|
|
542
|
+
this.handleMouseOver).
|
|
543
|
+
unlisten(element, goog.events.EventType.MOUSEDOWN,
|
|
544
|
+
this.handleMouseDown).
|
|
545
|
+
unlisten(element, goog.events.EventType.MOUSEUP, this.handleMouseUp).
|
|
546
|
+
unlisten(element, goog.events.EventType.MOUSEOUT, this.handleMouseOut);
|
|
547
|
+
if (goog.userAgent.IE) {
|
|
548
|
+
handler.unlisten(element, goog.events.EventType.DBLCLICK,
|
|
549
|
+
this.handleDblClick);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Cleans up the component before its DOM is removed from the document, and
|
|
557
|
+
* removes event handlers. Overrides {@link goog.ui.Component#exitDocument}
|
|
558
|
+
* by making sure that components that are removed from the document aren't
|
|
559
|
+
* focusable (i.e. have no tab index).
|
|
560
|
+
* @override
|
|
561
|
+
*/
|
|
562
|
+
goog.ui.Control.prototype.exitDocument = function() {
|
|
563
|
+
goog.ui.Control.superClass_.exitDocument.call(this);
|
|
564
|
+
if (this.keyHandler_) {
|
|
565
|
+
this.keyHandler_.detach();
|
|
566
|
+
}
|
|
567
|
+
if (this.isVisible() && this.isEnabled()) {
|
|
568
|
+
this.renderer_.setFocusable(this, false);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
/** @inheritDoc */
|
|
574
|
+
goog.ui.Control.prototype.disposeInternal = function() {
|
|
575
|
+
goog.ui.Control.superClass_.disposeInternal.call(this);
|
|
576
|
+
if (this.keyHandler_) {
|
|
577
|
+
this.keyHandler_.dispose();
|
|
578
|
+
delete this.keyHandler_;
|
|
579
|
+
}
|
|
580
|
+
delete this.renderer_;
|
|
581
|
+
this.content_ = null;
|
|
582
|
+
this.extraClassNames_ = null;
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
// Component content management.
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Returns the text caption or DOM structure displayed in the component.
|
|
591
|
+
* @return {goog.ui.ControlContent} Text caption or DOM structure
|
|
592
|
+
* comprising the component's contents.
|
|
593
|
+
*/
|
|
594
|
+
goog.ui.Control.prototype.getContent = function() {
|
|
595
|
+
return this.content_;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Sets the component's content to the given text caption, element, or array of
|
|
601
|
+
* nodes. (If the argument is an array of nodes, it must be an actual array,
|
|
602
|
+
* not an array-like object.)
|
|
603
|
+
* @param {goog.ui.ControlContent} content Text caption or DOM
|
|
604
|
+
* structure to set as the component's contents.
|
|
605
|
+
*/
|
|
606
|
+
goog.ui.Control.prototype.setContent = function(content) {
|
|
607
|
+
// Controls support pluggable renderers; delegate to the renderer.
|
|
608
|
+
this.renderer_.setContent(this.getElement(), content);
|
|
609
|
+
|
|
610
|
+
// setContentInternal needs to be after the renderer, since the implementation
|
|
611
|
+
// may depend on the content being in the DOM.
|
|
612
|
+
this.setContentInternal(content);
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Sets the component's content to the given text caption, element, or array
|
|
618
|
+
* of nodes. Unlike {@link #setContent}, doesn't modify the component's DOM.
|
|
619
|
+
* Called by renderers during element decoration. Considered protected; should
|
|
620
|
+
* only be used within this package and by subclasses.
|
|
621
|
+
* @param {goog.ui.ControlContent} content Text caption or DOM structure
|
|
622
|
+
* to set as the component's contents.
|
|
623
|
+
* @protected
|
|
624
|
+
*/
|
|
625
|
+
goog.ui.Control.prototype.setContentInternal = function(content) {
|
|
626
|
+
this.content_ = content;
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Returns the text caption of the component.
|
|
632
|
+
* @param {function(Node): string} getChildElementContent Function that takes an
|
|
633
|
+
* element and returns a string.
|
|
634
|
+
* @return {?string} Text caption of the component (null if none).
|
|
635
|
+
*/
|
|
636
|
+
goog.ui.Control.prototype.getCaptionInternal =
|
|
637
|
+
function(getChildElementContent) {
|
|
638
|
+
var content = this.getContent();
|
|
639
|
+
if (!content || goog.isString(content)) {
|
|
640
|
+
return content;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
var caption = goog.isArray(content) ?
|
|
644
|
+
goog.array.map(content, getChildElementContent).join('') :
|
|
645
|
+
goog.dom.getTextContent(/** @type {!Node} */ (content));
|
|
646
|
+
return caption && goog.string.trim(caption);
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Returns the text caption of the component.
|
|
652
|
+
* @return {?string} Text caption of the component (null if none).
|
|
653
|
+
*/
|
|
654
|
+
goog.ui.Control.prototype.getCaption = function() {
|
|
655
|
+
return this.getCaptionInternal(goog.dom.getTextContent);
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Sets the text caption of the component.
|
|
661
|
+
* @param {string} caption Text caption of the component (null to clear).
|
|
662
|
+
*/
|
|
663
|
+
goog.ui.Control.prototype.setCaption = function(caption) {
|
|
664
|
+
this.setContent(caption);
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
// Component state management.
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
/** @inheritDoc */
|
|
672
|
+
goog.ui.Control.prototype.setRightToLeft = function(rightToLeft) {
|
|
673
|
+
// The superclass implementation ensures the control isn't in the document.
|
|
674
|
+
goog.ui.Control.superClass_.setRightToLeft.call(this, rightToLeft);
|
|
675
|
+
|
|
676
|
+
var element = this.getElement();
|
|
677
|
+
if (element) {
|
|
678
|
+
this.renderer_.setRightToLeft(element, rightToLeft);
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Returns true if the control allows text selection within its DOM, false
|
|
685
|
+
* otherwise. Controls that disallow text selection have the appropriate
|
|
686
|
+
* unselectable styling applied to their elements. Note that controls hosted
|
|
687
|
+
* in containers will report that they allow text selection even if their
|
|
688
|
+
* container disallows text selection.
|
|
689
|
+
* @return {boolean} Whether the control allows text selection.
|
|
690
|
+
*/
|
|
691
|
+
goog.ui.Control.prototype.isAllowTextSelection = function() {
|
|
692
|
+
return this.allowTextSelection_;
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Allows or disallows text selection within the control's DOM.
|
|
698
|
+
* @param {boolean} allow Whether the control should allow text selection.
|
|
699
|
+
*/
|
|
700
|
+
goog.ui.Control.prototype.setAllowTextSelection = function(allow) {
|
|
701
|
+
this.allowTextSelection_ = allow;
|
|
702
|
+
|
|
703
|
+
var element = this.getElement();
|
|
704
|
+
if (element) {
|
|
705
|
+
this.renderer_.setAllowTextSelection(element, allow);
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Returns true if the component's visibility is set to visible, false if
|
|
712
|
+
* it is set to hidden. A component that is set to hidden is guaranteed
|
|
713
|
+
* to be hidden from the user, but the reverse isn't necessarily true.
|
|
714
|
+
* A component may be set to visible but can otherwise be obscured by another
|
|
715
|
+
* element, rendered off-screen, or hidden using direct CSS manipulation.
|
|
716
|
+
* @return {boolean} Whether the component is visible.
|
|
717
|
+
*/
|
|
718
|
+
goog.ui.Control.prototype.isVisible = function() {
|
|
719
|
+
return this.visible_;
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Shows or hides the component. Does nothing if the component already has
|
|
725
|
+
* the requested visibility. Otherwise, dispatches a SHOW or HIDE event as
|
|
726
|
+
* appropriate, giving listeners a chance to prevent the visibility change.
|
|
727
|
+
* When showing a component that is both enabled and focusable, ensures that
|
|
728
|
+
* its key target has a tab index. When hiding a component that is enabled
|
|
729
|
+
* and focusable, blurs its key target and removes its tab index.
|
|
730
|
+
* @param {boolean} visible Whether to show or hide the component.
|
|
731
|
+
* @param {boolean=} opt_force If true, doesn't check whether the component
|
|
732
|
+
* already has the requested visibility, and doesn't dispatch any events.
|
|
733
|
+
* @return {boolean} Whether the visibility was changed.
|
|
734
|
+
*/
|
|
735
|
+
goog.ui.Control.prototype.setVisible = function(visible, opt_force) {
|
|
736
|
+
if (opt_force || (this.visible_ != visible && this.dispatchEvent(visible ?
|
|
737
|
+
goog.ui.Component.EventType.SHOW : goog.ui.Component.EventType.HIDE))) {
|
|
738
|
+
var element = this.getElement();
|
|
739
|
+
if (element) {
|
|
740
|
+
this.renderer_.setVisible(element, visible);
|
|
741
|
+
}
|
|
742
|
+
if (this.isEnabled()) {
|
|
743
|
+
this.renderer_.setFocusable(this, visible);
|
|
744
|
+
}
|
|
745
|
+
this.visible_ = visible;
|
|
746
|
+
return true;
|
|
747
|
+
}
|
|
748
|
+
return false;
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Returns true if the component is enabled, false otherwise.
|
|
754
|
+
* @return {boolean} Whether the component is enabled.
|
|
755
|
+
*/
|
|
756
|
+
goog.ui.Control.prototype.isEnabled = function() {
|
|
757
|
+
return !this.hasState(goog.ui.Component.State.DISABLED);
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Returns true if the control has a parent that is itself disabled, false
|
|
763
|
+
* otherwise.
|
|
764
|
+
* @return {boolean} Whether the component is hosted in a disabled container.
|
|
765
|
+
* @private
|
|
766
|
+
*/
|
|
767
|
+
goog.ui.Control.prototype.isParentDisabled_ = function() {
|
|
768
|
+
var parent = this.getParent();
|
|
769
|
+
return !!parent && typeof parent.isEnabled == 'function' &&
|
|
770
|
+
!parent.isEnabled();
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Enables or disables the component. Does nothing if this state transition
|
|
776
|
+
* is disallowed. If the component is both visible and focusable, updates its
|
|
777
|
+
* focused state and tab index as needed. If the component is being disabled,
|
|
778
|
+
* ensures that it is also deactivated and un-highlighted first. Note that the
|
|
779
|
+
* component's enabled/disabled state is "locked" as long as it is hosted in a
|
|
780
|
+
* {@link goog.ui.Container} that is itself disabled; this is to prevent clients
|
|
781
|
+
* from accidentally re-enabling a control that is in a disabled container.
|
|
782
|
+
* @param {boolean} enable Whether to enable or disable the component.
|
|
783
|
+
* @see #isTransitionAllowed
|
|
784
|
+
*/
|
|
785
|
+
goog.ui.Control.prototype.setEnabled = function(enable) {
|
|
786
|
+
if (!this.isParentDisabled_() &&
|
|
787
|
+
this.isTransitionAllowed(goog.ui.Component.State.DISABLED, !enable)) {
|
|
788
|
+
if (!enable) {
|
|
789
|
+
this.setActive(false);
|
|
790
|
+
this.setHighlighted(false);
|
|
791
|
+
}
|
|
792
|
+
if (this.isVisible()) {
|
|
793
|
+
this.renderer_.setFocusable(this, enable);
|
|
794
|
+
}
|
|
795
|
+
this.setState(goog.ui.Component.State.DISABLED, !enable);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Returns true if the component is currently highlighted, false otherwise.
|
|
802
|
+
* @return {boolean} Whether the component is highlighted.
|
|
803
|
+
*/
|
|
804
|
+
goog.ui.Control.prototype.isHighlighted = function() {
|
|
805
|
+
return this.hasState(goog.ui.Component.State.HOVER);
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Highlights or unhighlights the component. Does nothing if this state
|
|
811
|
+
* transition is disallowed.
|
|
812
|
+
* @param {boolean} highlight Whether to highlight or unhighlight the component.
|
|
813
|
+
* @see #isTransitionAllowed
|
|
814
|
+
*/
|
|
815
|
+
goog.ui.Control.prototype.setHighlighted = function(highlight) {
|
|
816
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.HOVER, highlight)) {
|
|
817
|
+
this.setState(goog.ui.Component.State.HOVER, highlight);
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Returns true if the component is active (pressed), false otherwise.
|
|
824
|
+
* @return {boolean} Whether the component is active.
|
|
825
|
+
*/
|
|
826
|
+
goog.ui.Control.prototype.isActive = function() {
|
|
827
|
+
return this.hasState(goog.ui.Component.State.ACTIVE);
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Activates or deactivates the component. Does nothing if this state
|
|
833
|
+
* transition is disallowed.
|
|
834
|
+
* @param {boolean} active Whether to activate or deactivate the component.
|
|
835
|
+
* @see #isTransitionAllowed
|
|
836
|
+
*/
|
|
837
|
+
goog.ui.Control.prototype.setActive = function(active) {
|
|
838
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.ACTIVE, active)) {
|
|
839
|
+
this.setState(goog.ui.Component.State.ACTIVE, active);
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Returns true if the component is selected, false otherwise.
|
|
846
|
+
* @return {boolean} Whether the component is selected.
|
|
847
|
+
*/
|
|
848
|
+
goog.ui.Control.prototype.isSelected = function() {
|
|
849
|
+
return this.hasState(goog.ui.Component.State.SELECTED);
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Selects or unselects the component. Does nothing if this state transition
|
|
855
|
+
* is disallowed.
|
|
856
|
+
* @param {boolean} select Whether to select or unselect the component.
|
|
857
|
+
* @see #isTransitionAllowed
|
|
858
|
+
*/
|
|
859
|
+
goog.ui.Control.prototype.setSelected = function(select) {
|
|
860
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.SELECTED, select)) {
|
|
861
|
+
this.setState(goog.ui.Component.State.SELECTED, select);
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Returns true if the component is checked, false otherwise.
|
|
868
|
+
* @return {boolean} Whether the component is checked.
|
|
869
|
+
*/
|
|
870
|
+
goog.ui.Control.prototype.isChecked = function() {
|
|
871
|
+
return this.hasState(goog.ui.Component.State.CHECKED);
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Checks or unchecks the component. Does nothing if this state transition
|
|
877
|
+
* is disallowed.
|
|
878
|
+
* @param {boolean} check Whether to check or uncheck the component.
|
|
879
|
+
* @see #isTransitionAllowed
|
|
880
|
+
*/
|
|
881
|
+
goog.ui.Control.prototype.setChecked = function(check) {
|
|
882
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.CHECKED, check)) {
|
|
883
|
+
this.setState(goog.ui.Component.State.CHECKED, check);
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Returns true if the component is styled to indicate that it has keyboard
|
|
890
|
+
* focus, false otherwise. Note that {@code isFocused()} returning true
|
|
891
|
+
* doesn't guarantee that the component's key event target has keyborad focus,
|
|
892
|
+
* only that it is styled as such.
|
|
893
|
+
* @return {boolean} Whether the component is styled to indicate as having
|
|
894
|
+
* keyboard focus.
|
|
895
|
+
*/
|
|
896
|
+
goog.ui.Control.prototype.isFocused = function() {
|
|
897
|
+
return this.hasState(goog.ui.Component.State.FOCUSED);
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Applies or removes styling indicating that the component has keyboard focus.
|
|
903
|
+
* Note that unlike the other "set" methods, this method is called as a result
|
|
904
|
+
* of the component's element having received or lost keyboard focus, not the
|
|
905
|
+
* other way around, so calling {@code setFocused(true)} doesn't guarantee that
|
|
906
|
+
* the component's key event target has keyboard focus, only that it is styled
|
|
907
|
+
* as such.
|
|
908
|
+
* @param {boolean} focused Whether to apply or remove styling to indicate that
|
|
909
|
+
* the component's element has keyboard focus.
|
|
910
|
+
*/
|
|
911
|
+
goog.ui.Control.prototype.setFocused = function(focused) {
|
|
912
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.FOCUSED, focused)) {
|
|
913
|
+
this.setState(goog.ui.Component.State.FOCUSED, focused);
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Returns true if the component is open (expanded), false otherwise.
|
|
920
|
+
* @return {boolean} Whether the component is open.
|
|
921
|
+
*/
|
|
922
|
+
goog.ui.Control.prototype.isOpen = function() {
|
|
923
|
+
return this.hasState(goog.ui.Component.State.OPENED);
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Opens (expands) or closes (collapses) the component. Does nothing if this
|
|
929
|
+
* state transition is disallowed.
|
|
930
|
+
* @param {boolean} open Whether to open or close the component.
|
|
931
|
+
* @see #isTransitionAllowed
|
|
932
|
+
*/
|
|
933
|
+
goog.ui.Control.prototype.setOpen = function(open) {
|
|
934
|
+
if (this.isTransitionAllowed(goog.ui.Component.State.OPENED, open)) {
|
|
935
|
+
this.setState(goog.ui.Component.State.OPENED, open);
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Returns the component's state as a bit mask of {@link
|
|
942
|
+
* goog.ui.Component.State}s.
|
|
943
|
+
* @return {number} Bit mask representing component state.
|
|
944
|
+
*/
|
|
945
|
+
goog.ui.Control.prototype.getState = function() {
|
|
946
|
+
return this.state_;
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Returns true if the component is in the specified state, false otherwise.
|
|
952
|
+
* @param {goog.ui.Component.State} state State to check.
|
|
953
|
+
* @return {boolean} Whether the component is in the given state.
|
|
954
|
+
*/
|
|
955
|
+
goog.ui.Control.prototype.hasState = function(state) {
|
|
956
|
+
return !!(this.state_ & state);
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Sets or clears the given state on the component, and updates its styling
|
|
962
|
+
* accordingly. Does nothing if the component is already in the correct state
|
|
963
|
+
* or if it doesn't support the specified state. Doesn't dispatch any state
|
|
964
|
+
* transition events; use advisedly.
|
|
965
|
+
* @param {goog.ui.Component.State} state State to set or clear.
|
|
966
|
+
* @param {boolean} enable Whether to set or clear the state (if supported).
|
|
967
|
+
*/
|
|
968
|
+
goog.ui.Control.prototype.setState = function(state, enable) {
|
|
969
|
+
if (this.isSupportedState(state) && enable != this.hasState(state)) {
|
|
970
|
+
// Delegate actual styling to the renderer, since it is DOM-specific.
|
|
971
|
+
this.renderer_.setState(this, state, enable);
|
|
972
|
+
this.state_ = enable ? this.state_ | state : this.state_ & ~state;
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Sets the component's state to the state represented by a bit mask of
|
|
979
|
+
* {@link goog.ui.Component.State}s. Unlike {@link #setState}, doesn't
|
|
980
|
+
* update the component's styling, and doesn't reject unsupported states.
|
|
981
|
+
* Called by renderers during element decoration. Considered protected;
|
|
982
|
+
* should only be used within this package and by subclasses.
|
|
983
|
+
* @param {number} state Bit mask representing component state.
|
|
984
|
+
* @protected
|
|
985
|
+
*/
|
|
986
|
+
goog.ui.Control.prototype.setStateInternal = function(state) {
|
|
987
|
+
this.state_ = state;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Returns true if the component supports the specified state, false otherwise.
|
|
993
|
+
* @param {goog.ui.Component.State} state State to check.
|
|
994
|
+
* @return {boolean} Whether the component supports the given state.
|
|
995
|
+
*/
|
|
996
|
+
goog.ui.Control.prototype.isSupportedState = function(state) {
|
|
997
|
+
return !!(this.supportedStates_ & state);
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Enables or disables support for the given state. Disabling support
|
|
1003
|
+
* for a state while the component is in that state is an error.
|
|
1004
|
+
* @param {goog.ui.Component.State} state State to support or de-support.
|
|
1005
|
+
* @param {boolean} support Whether the component should support the state.
|
|
1006
|
+
* @throws {Error} If disabling support for a state the control is currently in.
|
|
1007
|
+
*/
|
|
1008
|
+
goog.ui.Control.prototype.setSupportedState = function(state, support) {
|
|
1009
|
+
if (this.isInDocument() && this.hasState(state) && !support) {
|
|
1010
|
+
// Since we hook up event handlers in enterDocument(), this is an error.
|
|
1011
|
+
throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (!support && this.hasState(state)) {
|
|
1015
|
+
// We are removing support for a state that the component is currently in.
|
|
1016
|
+
this.setState(state, false);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
this.supportedStates_ = support ?
|
|
1020
|
+
this.supportedStates_ | state : this.supportedStates_ & ~state;
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Returns true if the component provides default event handling for the state,
|
|
1026
|
+
* false otherwise.
|
|
1027
|
+
* @param {goog.ui.Component.State} state State to check.
|
|
1028
|
+
* @return {boolean} Whether the component provides default event handling for
|
|
1029
|
+
* the state.
|
|
1030
|
+
*/
|
|
1031
|
+
goog.ui.Control.prototype.isAutoState = function(state) {
|
|
1032
|
+
return !!(this.autoStates_ & state) && this.isSupportedState(state);
|
|
1033
|
+
};
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Enables or disables automatic event handling for the given state(s).
|
|
1038
|
+
* @param {number} states Bit mask of {@link goog.ui.Component.State}s for which
|
|
1039
|
+
* default event handling is to be enabled or disabled.
|
|
1040
|
+
* @param {boolean} enable Whether the component should provide default event
|
|
1041
|
+
* handling for the state(s).
|
|
1042
|
+
*/
|
|
1043
|
+
goog.ui.Control.prototype.setAutoStates = function(states, enable) {
|
|
1044
|
+
this.autoStates_ = enable ?
|
|
1045
|
+
this.autoStates_ | states : this.autoStates_ & ~states;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Returns true if the component is set to dispatch transition events for the
|
|
1051
|
+
* given state, false otherwise.
|
|
1052
|
+
* @param {goog.ui.Component.State} state State to check.
|
|
1053
|
+
* @return {boolean} Whether the component dispatches transition events for
|
|
1054
|
+
* the state.
|
|
1055
|
+
*/
|
|
1056
|
+
goog.ui.Control.prototype.isDispatchTransitionEvents = function(state) {
|
|
1057
|
+
return !!(this.statesWithTransitionEvents_ & state) &&
|
|
1058
|
+
this.isSupportedState(state);
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Enables or disables transition events for the given state(s). Controls
|
|
1064
|
+
* handle state transitions internally by default, and only dispatch state
|
|
1065
|
+
* transition events if explicitly requested to do so by calling this method.
|
|
1066
|
+
* @param {number} states Bit mask of {@link goog.ui.Component.State}s for
|
|
1067
|
+
* which transition events should be enabled or disabled.
|
|
1068
|
+
* @param {boolean} enable Whether transition events should be enabled.
|
|
1069
|
+
*/
|
|
1070
|
+
goog.ui.Control.prototype.setDispatchTransitionEvents = function(states,
|
|
1071
|
+
enable) {
|
|
1072
|
+
this.statesWithTransitionEvents_ = enable ?
|
|
1073
|
+
this.statesWithTransitionEvents_ | states :
|
|
1074
|
+
this.statesWithTransitionEvents_ & ~states;
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Returns true if the transition into or out of the given state is allowed to
|
|
1080
|
+
* proceed, false otherwise. A state transition is allowed under the following
|
|
1081
|
+
* conditions:
|
|
1082
|
+
* <ul>
|
|
1083
|
+
* <li>the component supports the state,
|
|
1084
|
+
* <li>the component isn't already in the target state,
|
|
1085
|
+
* <li>either the component is configured not to dispatch events for this
|
|
1086
|
+
* state transition, or a transition event was dispatched and wasn't
|
|
1087
|
+
* canceled by any event listener, and
|
|
1088
|
+
* <li>the component hasn't been disposed of
|
|
1089
|
+
* </ul>
|
|
1090
|
+
* Considered protected; should only be used within this package and by
|
|
1091
|
+
* subclasses.
|
|
1092
|
+
* @param {goog.ui.Component.State} state State to/from which the control is
|
|
1093
|
+
* transitioning.
|
|
1094
|
+
* @param {boolean} enable Whether the control is entering or leaving the state.
|
|
1095
|
+
* @return {boolean} Whether the state transition is allowed to proceed.
|
|
1096
|
+
* @protected
|
|
1097
|
+
*/
|
|
1098
|
+
goog.ui.Control.prototype.isTransitionAllowed = function(state, enable) {
|
|
1099
|
+
return this.isSupportedState(state) &&
|
|
1100
|
+
this.hasState(state) != enable &&
|
|
1101
|
+
(!(this.statesWithTransitionEvents_ & state) || this.dispatchEvent(
|
|
1102
|
+
goog.ui.Component.getStateTransitionEvent(state, enable))) &&
|
|
1103
|
+
!this.isDisposed();
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
// Default event handlers, to be overridden in subclasses.
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Handles mouseover events. Dispatches an ENTER event; if the event isn't
|
|
1112
|
+
* canceled, the component is enabled, and it supports auto-highlighting,
|
|
1113
|
+
* highlights the component. Considered protected; should only be used
|
|
1114
|
+
* within this package and by subclasses.
|
|
1115
|
+
* @param {goog.events.BrowserEvent} e Mouse event to handle.
|
|
1116
|
+
*/
|
|
1117
|
+
goog.ui.Control.prototype.handleMouseOver = function(e) {
|
|
1118
|
+
// Ignore mouse moves between descendants.
|
|
1119
|
+
if (!goog.ui.Control.isMouseEventWithinElement_(e, this.getElement()) &&
|
|
1120
|
+
this.dispatchEvent(goog.ui.Component.EventType.ENTER) &&
|
|
1121
|
+
this.isEnabled() &&
|
|
1122
|
+
this.isAutoState(goog.ui.Component.State.HOVER)) {
|
|
1123
|
+
this.setHighlighted(true);
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Handles mouseout events. Dispatches a LEAVE event; if the event isn't
|
|
1130
|
+
* canceled, and the component supports auto-highlighting, deactivates and
|
|
1131
|
+
* un-highlights the component. Considered protected; should only be used
|
|
1132
|
+
* within this package and by subclasses.
|
|
1133
|
+
* @param {goog.events.BrowserEvent} e Mouse event to handle.
|
|
1134
|
+
*/
|
|
1135
|
+
goog.ui.Control.prototype.handleMouseOut = function(e) {
|
|
1136
|
+
if (!goog.ui.Control.isMouseEventWithinElement_(e, this.getElement()) &&
|
|
1137
|
+
this.dispatchEvent(goog.ui.Component.EventType.LEAVE)) {
|
|
1138
|
+
if (this.isAutoState(goog.ui.Component.State.ACTIVE)) {
|
|
1139
|
+
// Deactivate on mouseout; otherwise we lose track of the mouse button.
|
|
1140
|
+
this.setActive(false);
|
|
1141
|
+
}
|
|
1142
|
+
if (this.isAutoState(goog.ui.Component.State.HOVER)) {
|
|
1143
|
+
this.setHighlighted(false);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Checks if a mouse event (mouseover or mouseout) occured below an element.
|
|
1151
|
+
* @param {goog.events.BrowserEvent} e Mouse event (should be mouseover or
|
|
1152
|
+
* mouseout).
|
|
1153
|
+
* @param {Element} elem The ancestor element.
|
|
1154
|
+
* @return {boolean} Whether the event has a relatedTarget (the element the
|
|
1155
|
+
* mouse is coming from) and it's a descendent of elem.
|
|
1156
|
+
* @private
|
|
1157
|
+
*/
|
|
1158
|
+
goog.ui.Control.isMouseEventWithinElement_ = function(e, elem) {
|
|
1159
|
+
// If relatedTarget is null, it means there was no previous element (e.g.
|
|
1160
|
+
// the mouse moved out of the window). Assume this means that the mouse
|
|
1161
|
+
// event was not within the element.
|
|
1162
|
+
return !!e.relatedTarget && goog.dom.contains(elem, e.relatedTarget);
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* Handles mousedown events. If the component is enabled, highlights and
|
|
1168
|
+
* activates it. If the component isn't configured for keyboard access,
|
|
1169
|
+
* prevents it from receiving keyboard focus. Considered protected; should
|
|
1170
|
+
* only be used within this package andy by subclasses.
|
|
1171
|
+
* @param {goog.events.Event} e Mouse event to handle.
|
|
1172
|
+
*/
|
|
1173
|
+
goog.ui.Control.prototype.handleMouseDown = function(e) {
|
|
1174
|
+
if (this.isEnabled()) {
|
|
1175
|
+
// Highlight enabled control on mousedown, regardless of the mouse button.
|
|
1176
|
+
if (this.isAutoState(goog.ui.Component.State.HOVER)) {
|
|
1177
|
+
this.setHighlighted(true);
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
// For the left button only, activate the control, and focus its key event
|
|
1181
|
+
// target (if supported).
|
|
1182
|
+
if (e.isMouseActionButton()) {
|
|
1183
|
+
if (this.isAutoState(goog.ui.Component.State.ACTIVE)) {
|
|
1184
|
+
this.setActive(true);
|
|
1185
|
+
}
|
|
1186
|
+
if (this.renderer_.isFocusable(this)) {
|
|
1187
|
+
this.getKeyEventTarget().focus();
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
// Cancel the default action unless the control allows text selection.
|
|
1193
|
+
if (!this.isAllowTextSelection() && e.isMouseActionButton()) {
|
|
1194
|
+
e.preventDefault();
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Handles mouseup events. If the component is enabled, highlights it. If
|
|
1201
|
+
* the component has previously been activated, performs its associated action
|
|
1202
|
+
* by calling {@link performActionInternal}, then deactivates it. Considered
|
|
1203
|
+
* protected; should only be used within this package and by subclasses.
|
|
1204
|
+
* @param {goog.events.Event} e Mouse event to handle.
|
|
1205
|
+
*/
|
|
1206
|
+
goog.ui.Control.prototype.handleMouseUp = function(e) {
|
|
1207
|
+
if (this.isEnabled()) {
|
|
1208
|
+
if (this.isAutoState(goog.ui.Component.State.HOVER)) {
|
|
1209
|
+
this.setHighlighted(true);
|
|
1210
|
+
}
|
|
1211
|
+
if (this.isActive() &&
|
|
1212
|
+
this.performActionInternal(e) &&
|
|
1213
|
+
this.isAutoState(goog.ui.Component.State.ACTIVE)) {
|
|
1214
|
+
this.setActive(false);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* Handles dblclick events. Should only be registered if the user agent is
|
|
1222
|
+
* IE. If the component is enabled, performs its associated action by calling
|
|
1223
|
+
* {@link performActionInternal}. This is used to allow more performant
|
|
1224
|
+
* buttons in IE. In IE, no mousedown event is fired when that mousedown will
|
|
1225
|
+
* trigger a dblclick event. Because of this, a user clicking quickly will
|
|
1226
|
+
* only cause ACTION events to fire on every other click. This is a workaround
|
|
1227
|
+
* to generate ACTION events for every click. Unfortunately, this workaround
|
|
1228
|
+
* won't ever trigger the ACTIVE state. This is roughly the same behaviour as
|
|
1229
|
+
* if this were a 'button' element with a listener on mouseup. Considered
|
|
1230
|
+
* protected; should only be used within this package and by subclasses.
|
|
1231
|
+
* @param {goog.events.Event} e Mouse event to handle.
|
|
1232
|
+
*/
|
|
1233
|
+
goog.ui.Control.prototype.handleDblClick = function(e) {
|
|
1234
|
+
if (this.isEnabled()) {
|
|
1235
|
+
this.performActionInternal(e);
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Performs the appropriate action when the control is activated by the user.
|
|
1242
|
+
* The default implementation first updates the checked and selected state of
|
|
1243
|
+
* controls that support them, then dispatches an ACTION event. Considered
|
|
1244
|
+
* protected; should only be used within this package and by subclasses.
|
|
1245
|
+
* @param {goog.events.Event} e Event that triggered the action.
|
|
1246
|
+
* @return {boolean} Whether the action is allowed to proceed.
|
|
1247
|
+
* @protected
|
|
1248
|
+
*/
|
|
1249
|
+
goog.ui.Control.prototype.performActionInternal = function(e) {
|
|
1250
|
+
if (this.isAutoState(goog.ui.Component.State.CHECKED)) {
|
|
1251
|
+
this.setChecked(!this.isChecked());
|
|
1252
|
+
}
|
|
1253
|
+
if (this.isAutoState(goog.ui.Component.State.SELECTED)) {
|
|
1254
|
+
this.setSelected(true);
|
|
1255
|
+
}
|
|
1256
|
+
if (this.isAutoState(goog.ui.Component.State.OPENED)) {
|
|
1257
|
+
this.setOpen(!this.isOpen());
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
var actionEvent = new goog.events.Event(goog.ui.Component.EventType.ACTION,
|
|
1261
|
+
this);
|
|
1262
|
+
if (e) {
|
|
1263
|
+
var properties = [
|
|
1264
|
+
'altKey', 'ctrlKey', 'metaKey', 'shiftKey', 'platformModifierKey'
|
|
1265
|
+
];
|
|
1266
|
+
for (var property, i = 0; property = properties[i]; i++) {
|
|
1267
|
+
actionEvent[property] = e[property];
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return this.dispatchEvent(actionEvent);
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Handles focus events on the component's key event target element. If the
|
|
1276
|
+
* component is focusable, updates its state and styling to indicate that it
|
|
1277
|
+
* now has keyboard focus. Considered protected; should only be used within
|
|
1278
|
+
* this package and by subclasses. <b>Warning:</b> IE dispatches focus and
|
|
1279
|
+
* blur events asynchronously!
|
|
1280
|
+
* @param {goog.events.Event} e Focus event to handle.
|
|
1281
|
+
*/
|
|
1282
|
+
goog.ui.Control.prototype.handleFocus = function(e) {
|
|
1283
|
+
if (this.isAutoState(goog.ui.Component.State.FOCUSED)) {
|
|
1284
|
+
this.setFocused(true);
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Handles blur events on the component's key event target element. Always
|
|
1291
|
+
* deactivates the component. In addition, if the component is focusable,
|
|
1292
|
+
* updates its state and styling to indicate that it no longer has keyboard
|
|
1293
|
+
* focus. Considered protected; should only be used within this package and
|
|
1294
|
+
* by subclasses. <b>Warning:</b> IE dispatches focus and blur events
|
|
1295
|
+
* asynchronously!
|
|
1296
|
+
* @param {goog.events.Event} e Blur event to handle.
|
|
1297
|
+
*/
|
|
1298
|
+
goog.ui.Control.prototype.handleBlur = function(e) {
|
|
1299
|
+
if (this.isAutoState(goog.ui.Component.State.ACTIVE)) {
|
|
1300
|
+
this.setActive(false);
|
|
1301
|
+
}
|
|
1302
|
+
if (this.isAutoState(goog.ui.Component.State.FOCUSED)) {
|
|
1303
|
+
this.setFocused(false);
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Attempts to handle a keyboard event, if the component is enabled and visible,
|
|
1310
|
+
* by calling {@link handleKeyEventInternal}. Considered protected; should only
|
|
1311
|
+
* be used within this package and by subclasses.
|
|
1312
|
+
* @param {goog.events.KeyEvent} e Key event to handle.
|
|
1313
|
+
* @return {boolean} Whether the key event was handled.
|
|
1314
|
+
*/
|
|
1315
|
+
goog.ui.Control.prototype.handleKeyEvent = function(e) {
|
|
1316
|
+
if (this.isVisible() && this.isEnabled() &&
|
|
1317
|
+
this.handleKeyEventInternal(e)) {
|
|
1318
|
+
e.preventDefault();
|
|
1319
|
+
e.stopPropagation();
|
|
1320
|
+
return true;
|
|
1321
|
+
}
|
|
1322
|
+
return false;
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Attempts to handle a keyboard event; returns true if the event was handled,
|
|
1328
|
+
* false otherwise. Considered protected; should only be used within this
|
|
1329
|
+
* package and by subclasses.
|
|
1330
|
+
* @param {goog.events.KeyEvent} e Key event to handle.
|
|
1331
|
+
* @return {boolean} Whether the key event was handled.
|
|
1332
|
+
* @protected
|
|
1333
|
+
*/
|
|
1334
|
+
goog.ui.Control.prototype.handleKeyEventInternal = function(e) {
|
|
1335
|
+
return e.keyCode == goog.events.KeyCodes.ENTER &&
|
|
1336
|
+
this.performActionInternal(e);
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
// Register the default renderer for goog.ui.Controls.
|
|
1341
|
+
goog.ui.registry.setDefaultRenderer(goog.ui.Control, goog.ui.ControlRenderer);
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
// Register a decorator factory function for goog.ui.Controls.
|
|
1345
|
+
goog.ui.registry.setDecoratorByClassName(goog.ui.ControlRenderer.CSS_CLASS,
|
|
1346
|
+
function() {
|
|
1347
|
+
return new goog.ui.Control(null);
|
|
1348
|
+
});
|