closure 1.2.701 → 1.3.0

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.
Files changed (1566) hide show
  1. data/README.md +9 -8
  2. data/closure-compiler/README +1 -1
  3. data/closure-compiler/compiler.jar +0 -0
  4. data/docs/SCRIPT.md +142 -0
  5. data/docs/closure/Closure/BeanShell.html +335 -0
  6. data/docs/closure/Closure/Compiler/Compilation.html +636 -0
  7. data/docs/closure/Closure/Compiler/Error.html +116 -0
  8. data/docs/closure/Closure/Compiler.html +387 -0
  9. data/docs/closure/Closure/FileResponse.html +622 -0
  10. data/docs/closure/Closure/Goog.html +1251 -0
  11. data/docs/closure/Closure/Middleware.html +304 -0
  12. data/docs/closure/Closure/Script/NotFound.html +116 -0
  13. data/docs/closure/Closure/Script/RenderStackOverflow.html +116 -0
  14. data/docs/closure/Closure/Script.html +1083 -0
  15. data/docs/closure/Closure/Server.html +439 -0
  16. data/docs/closure/Closure/ShowExceptions.html +266 -0
  17. data/docs/closure/Closure/Sources.html +1272 -0
  18. data/docs/closure/Closure/Templates/Error.html +116 -0
  19. data/docs/closure/Closure/Templates.html +361 -0
  20. data/docs/closure/Closure.html +715 -0
  21. data/docs/closure/_index.html +289 -0
  22. data/docs/closure/class_list.html +47 -0
  23. data/docs/closure/css/common.css +1 -0
  24. data/docs/closure/css/full_list.css +53 -0
  25. data/docs/closure/css/style.css +320 -0
  26. data/{closure-library/LICENSE → docs/closure/file.LICENSE.html} +106 -16
  27. data/docs/closure/file.README.html +79 -0
  28. data/docs/closure/file_list.html +52 -0
  29. data/docs/closure/frames.html +13 -0
  30. data/docs/closure/index.html +79 -0
  31. data/docs/closure/js/app.js +205 -0
  32. data/docs/closure/js/full_list.js +150 -0
  33. data/docs/closure/js/jquery.js +16 -0
  34. data/docs/closure/method_list.html +486 -0
  35. data/docs/closure/top-level-namespace.html +103 -0
  36. data/docs/index.erb +26 -0
  37. data/externs/chrome_extensions.externs +968 -0
  38. data/{scripts/externs/jquery_1_4_2.externs → externs/jquery-1.3.2.externs} +39 -170
  39. data/externs/jquery-1.4.3.externs +1289 -0
  40. data/externs/jquery-1.4.4.externs +1302 -0
  41. data/externs/jquery-1.5.externs +1697 -0
  42. data/externs/jquery.externs +4 -0
  43. data/lib/closure/beanshell.rb +9 -21
  44. data/lib/closure/compiler.rb +247 -102
  45. data/lib/closure/engines.rb +50 -0
  46. data/lib/closure/goog.rb +122 -68
  47. data/lib/closure/script.rb +68 -54
  48. data/lib/closure/server.rb +10 -1
  49. data/lib/closure/show_exceptions.rb +30 -3
  50. data/lib/closure/sources.rb +26 -25
  51. data/lib/closure/templates.rb +79 -124
  52. data/lib/closure/version.rb +1 -1
  53. data/lib/closure.rb +64 -43
  54. data/lib/shim.jar +0 -0
  55. data/scripts/config.ru +25 -0
  56. data/scripts/hello/compiler.js.erb +48 -0
  57. data/scripts/hello/compiler_build.js +5 -0
  58. data/scripts/hello/compiler_build.map +752 -0
  59. data/scripts/hello/compiler_debug.js +125 -0
  60. data/scripts/hello/hello.js +11 -0
  61. data/scripts/hello/index.erb +11 -0
  62. data/scripts/hello/legume.js +20 -0
  63. data/scripts/hello/legume.soy +9 -0
  64. data/scripts/index.erb +45 -5
  65. data/scripts/jquery/compiler.js.erb +7 -0
  66. data/scripts/jquery/compiler_out.js +1 -0
  67. data/scripts/jquery/index.erb +25 -0
  68. data/scripts/jquery/jquery_test.js +8 -0
  69. data/scripts/modules/api.js +11 -0
  70. data/scripts/modules/api_init.js +8 -0
  71. data/scripts/modules/app.js +102 -0
  72. data/scripts/modules/app_init.js +33 -0
  73. data/scripts/modules/compiler.js.erb +34 -0
  74. data/scripts/modules/compiler_build.js +6 -0
  75. data/scripts/modules/compiler_build.map +12077 -0
  76. data/scripts/modules/compiler_build_api.js +1 -0
  77. data/scripts/modules/compiler_build_app.js +74 -0
  78. data/scripts/modules/compiler_build_settings.js +2 -0
  79. data/scripts/modules/compiler_debug.js +6 -0
  80. data/scripts/modules/compiler_debug_api.js +11 -0
  81. data/scripts/modules/compiler_debug_app.js +2870 -0
  82. data/scripts/modules/compiler_debug_settings.js +42 -0
  83. data/scripts/modules/index.erb +18 -0
  84. data/scripts/modules/settings.js +19 -0
  85. data/scripts/modules/settings_init.js +14 -0
  86. data/scripts/{demos/rails_ujs.erb → rails/index.erb} +14 -6
  87. data/scripts/{demos → rails}/rails_ujs.js +0 -40
  88. data/scripts/svn.erb +228 -0
  89. data/scripts/welcome.erb +78 -0
  90. metadata +101 -1507
  91. data/.gitignore +0 -6
  92. data/.yardopts +0 -3
  93. data/closure-library/AUTHORS +0 -12
  94. data/closure-library/README +0 -6
  95. data/closure-library/all_tests.html +0 -113
  96. data/closure-library/alltests.js +0 -16
  97. data/closure-library/closure/bin/build/closurebuilder.py +0 -257
  98. data/closure-library/closure/bin/build/depstree.py +0 -186
  99. data/closure-library/closure/bin/build/depstree_test.py +0 -127
  100. data/closure-library/closure/bin/build/depswriter.py +0 -197
  101. data/closure-library/closure/bin/build/jscompiler.py +0 -69
  102. data/closure-library/closure/bin/build/source.py +0 -86
  103. data/closure-library/closure/bin/build/source_test.py +0 -57
  104. data/closure-library/closure/bin/build/treescan.py +0 -78
  105. data/closure-library/closure/bin/calcdeps.py +0 -570
  106. data/closure-library/closure/bin/scopify.py +0 -211
  107. data/closure-library/closure/css/inlay/g-base.css +0 -82
  108. data/closure-library/closure/css/inlay/g-fixed.css +0 -158
  109. data/closure-library/closure/css/inlay/g-ratio.css +0 -253
  110. data/closure-library/closure/goog/array/array.js +0 -1300
  111. data/closure-library/closure/goog/array/array_test.html +0 -1524
  112. data/closure-library/closure/goog/asserts/asserts.js +0 -277
  113. data/closure-library/closure/goog/asserts/asserts_test.html +0 -163
  114. data/closure-library/closure/goog/async/conditionaldelay.js +0 -238
  115. data/closure-library/closure/goog/async/conditionaldelay_test.html +0 -227
  116. data/closure-library/closure/goog/async/delay.js +0 -174
  117. data/closure-library/closure/goog/async/delay_test.html +0 -148
  118. data/closure-library/closure/goog/async/throttle.js +0 -189
  119. data/closure-library/closure/goog/async/throttle_test.html +0 -102
  120. data/closure-library/closure/goog/base.js +0 -1471
  121. data/closure-library/closure/goog/base_test.html +0 -1166
  122. data/closure-library/closure/goog/bootstrap/webworkers.js +0 -37
  123. data/closure-library/closure/goog/color/alpha.js +0 -436
  124. data/closure-library/closure/goog/color/alpha_test.html +0 -234
  125. data/closure-library/closure/goog/color/color.js +0 -757
  126. data/closure-library/closure/goog/color/color_test.html +0 -645
  127. data/closure-library/closure/goog/color/names.js +0 -176
  128. data/closure-library/closure/goog/crypt/arc4.js +0 -141
  129. data/closure-library/closure/goog/crypt/arc4_test.html +0 -42
  130. data/closure-library/closure/goog/crypt/base64.js +0 -267
  131. data/closure-library/closure/goog/crypt/base64_test.html +0 -106
  132. data/closure-library/closure/goog/crypt/basen.js +0 -242
  133. data/closure-library/closure/goog/crypt/basen_test.html +0 -167
  134. data/closure-library/closure/goog/crypt/crypt.js +0 -103
  135. data/closure-library/closure/goog/crypt/crypt_test.html +0 -68
  136. data/closure-library/closure/goog/crypt/hash32.js +0 -184
  137. data/closure-library/closure/goog/crypt/hash32_test.html +0 -287
  138. data/closure-library/closure/goog/crypt/sha1.js +0 -238
  139. data/closure-library/closure/goog/crypt/sha1_test.html +0 -47
  140. data/closure-library/closure/goog/css/autocomplete.css +0 -43
  141. data/closure-library/closure/goog/css/bubble.css +0 -84
  142. data/closure-library/closure/goog/css/button.css +0 -38
  143. data/closure-library/closure/goog/css/charpicker.css +0 -201
  144. data/closure-library/closure/goog/css/checkbox.css +0 -38
  145. data/closure-library/closure/goog/css/colormenubutton.css +0 -25
  146. data/closure-library/closure/goog/css/colorpalette.css +0 -54
  147. data/closure-library/closure/goog/css/colorpicker-simplegrid.css +0 -50
  148. data/closure-library/closure/goog/css/combobox.css +0 -57
  149. data/closure-library/closure/goog/css/common.css +0 -41
  150. data/closure-library/closure/goog/css/css3button.css +0 -77
  151. data/closure-library/closure/goog/css/css3menubutton.css +0 -23
  152. data/closure-library/closure/goog/css/custombutton.css +0 -164
  153. data/closure-library/closure/goog/css/datepicker.css +0 -148
  154. data/closure-library/closure/goog/css/dialog.css +0 -72
  155. data/closure-library/closure/goog/css/dimensionpicker.css +0 -47
  156. data/closure-library/closure/goog/css/dragdropdetector.css +0 -48
  157. data/closure-library/closure/goog/css/editor/bubble.css +0 -73
  158. data/closure-library/closure/goog/css/editor/dialog.css +0 -66
  159. data/closure-library/closure/goog/css/editor/linkdialog.css +0 -36
  160. data/closure-library/closure/goog/css/editortoolbar.css +0 -225
  161. data/closure-library/closure/goog/css/filteredmenu.css +0 -30
  162. data/closure-library/closure/goog/css/filterobservingmenuitem.css +0 -25
  163. data/closure-library/closure/goog/css/flatbutton.css +0 -65
  164. data/closure-library/closure/goog/css/flatmenubutton.css +0 -63
  165. data/closure-library/closure/goog/css/hovercard.css +0 -51
  166. data/closure-library/closure/goog/css/hsvapalette.css +0 -231
  167. data/closure-library/closure/goog/css/hsvpalette.css +0 -179
  168. data/closure-library/closure/goog/css/imagelessbutton.css +0 -160
  169. data/closure-library/closure/goog/css/imagelessmenubutton.css +0 -23
  170. data/closure-library/closure/goog/css/inputdatepicker.css +0 -12
  171. data/closure-library/closure/goog/css/linkbutton.css +0 -26
  172. data/closure-library/closure/goog/css/menu.css +0 -27
  173. data/closure-library/closure/goog/css/menubutton.css +0 -169
  174. data/closure-library/closure/goog/css/menuitem.css +0 -96
  175. data/closure-library/closure/goog/css/menuseparator.css +0 -19
  176. data/closure-library/closure/goog/css/multitestrunner.css +0 -121
  177. data/closure-library/closure/goog/css/offline.css +0 -147
  178. data/closure-library/closure/goog/css/palette.css +0 -36
  179. data/closure-library/closure/goog/css/popupdatepicker.css +0 -17
  180. data/closure-library/closure/goog/css/roundedpanel.css +0 -29
  181. data/closure-library/closure/goog/css/roundedtab.css +0 -158
  182. data/closure-library/closure/goog/css/submenu.css +0 -28
  183. data/closure-library/closure/goog/css/tab.css +0 -91
  184. data/closure-library/closure/goog/css/tabbar.css +0 -52
  185. data/closure-library/closure/goog/css/tablesorter.css +0 -14
  186. data/closure-library/closure/goog/css/toolbar.css +0 -400
  187. data/closure-library/closure/goog/css/tooltip.css +0 -14
  188. data/closure-library/closure/goog/css/tree.css +0 -147
  189. data/closure-library/closure/goog/css/tristatemenuitem.css +0 -43
  190. data/closure-library/closure/goog/cssom/cssom.js +0 -447
  191. data/closure-library/closure/goog/cssom/cssom_test.html +0 -343
  192. data/closure-library/closure/goog/cssom/cssom_test_import_1.css +0 -11
  193. data/closure-library/closure/goog/cssom/cssom_test_import_2.css +0 -10
  194. data/closure-library/closure/goog/cssom/cssom_test_link_1.css +0 -10
  195. data/closure-library/closure/goog/cssom/iframe/style.js +0 -1020
  196. data/closure-library/closure/goog/cssom/iframe/style_test.html +0 -391
  197. data/closure-library/closure/goog/cssom/iframe/style_test_import.css +0 -10
  198. data/closure-library/closure/goog/datasource/datamanager.js +0 -566
  199. data/closure-library/closure/goog/datasource/datasource.js +0 -646
  200. data/closure-library/closure/goog/datasource/datasource_test.html +0 -265
  201. data/closure-library/closure/goog/datasource/expr.js +0 -544
  202. data/closure-library/closure/goog/datasource/expr_test.html +0 -97
  203. data/closure-library/closure/goog/datasource/fastdatanode.js +0 -792
  204. data/closure-library/closure/goog/datasource/fastdatanode_test.html +0 -254
  205. data/closure-library/closure/goog/datasource/jsdatasource.js +0 -460
  206. data/closure-library/closure/goog/datasource/jsondatasource.js +0 -146
  207. data/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +0 -191
  208. data/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +0 -94
  209. data/closure-library/closure/goog/datasource/xmldatasource.js +0 -407
  210. data/closure-library/closure/goog/date/date.js +0 -1642
  211. data/closure-library/closure/goog/date/date_test.html +0 -1293
  212. data/closure-library/closure/goog/date/datelike.js +0 -27
  213. data/closure-library/closure/goog/date/daterange.js +0 -398
  214. data/closure-library/closure/goog/date/daterange_test.html +0 -213
  215. data/closure-library/closure/goog/date/relative.js +0 -425
  216. data/closure-library/closure/goog/date/relative_test.html +0 -124
  217. data/closure-library/closure/goog/date/utcdatetime.js +0 -178
  218. data/closure-library/closure/goog/date/utcdatetime_test.html +0 -119
  219. data/closure-library/closure/goog/debug/console.js +0 -138
  220. data/closure-library/closure/goog/debug/debug.js +0 -452
  221. data/closure-library/closure/goog/debug/debug_test.html +0 -32
  222. data/closure-library/closure/goog/debug/debugwindow.js +0 -582
  223. data/closure-library/closure/goog/debug/devcss/devcss.js +0 -435
  224. data/closure-library/closure/goog/debug/devcss/devcss_test.html +0 -365
  225. data/closure-library/closure/goog/debug/devcss/devcssrunner.js +0 -26
  226. data/closure-library/closure/goog/debug/divconsole.js +0 -141
  227. data/closure-library/closure/goog/debug/enhanceerror_test.html +0 -138
  228. data/closure-library/closure/goog/debug/entrypointregistry.js +0 -111
  229. data/closure-library/closure/goog/debug/entrypointregistry_test.html +0 -63
  230. data/closure-library/closure/goog/debug/error.js +0 -47
  231. data/closure-library/closure/goog/debug/error_test.html +0 -85
  232. data/closure-library/closure/goog/debug/errorhandler.js +0 -234
  233. data/closure-library/closure/goog/debug/errorhandler_async_test.html +0 -112
  234. data/closure-library/closure/goog/debug/errorhandler_test.html +0 -186
  235. data/closure-library/closure/goog/debug/errorhandlerweakdep.js +0 -38
  236. data/closure-library/closure/goog/debug/errorreporter.js +0 -324
  237. data/closure-library/closure/goog/debug/errorreporter_test.html +0 -289
  238. data/closure-library/closure/goog/debug/fancywindow.js +0 -265
  239. data/closure-library/closure/goog/debug/formatter.js +0 -314
  240. data/closure-library/closure/goog/debug/gcdiagnostics.js +0 -143
  241. data/closure-library/closure/goog/debug/logbuffer.js +0 -147
  242. data/closure-library/closure/goog/debug/logbuffer_test.html +0 -105
  243. data/closure-library/closure/goog/debug/logger.js +0 -809
  244. data/closure-library/closure/goog/debug/logger_test.html +0 -208
  245. data/closure-library/closure/goog/debug/logrecord.js +0 -271
  246. data/closure-library/closure/goog/debug/reflect.js +0 -163
  247. data/closure-library/closure/goog/debug/reflect_test.html +0 -81
  248. data/closure-library/closure/goog/debug/relativetimeprovider.js +0 -83
  249. data/closure-library/closure/goog/debug/tracer.js +0 -750
  250. data/closure-library/closure/goog/debug/tracer_test.html +0 -57
  251. data/closure-library/closure/goog/demos/advancedtooltip.html +0 -78
  252. data/closure-library/closure/goog/demos/animationqueue.html +0 -149
  253. data/closure-library/closure/goog/demos/autocomplete-basic.html +0 -56
  254. data/closure-library/closure/goog/demos/autocompleteremote.html +0 -40
  255. data/closure-library/closure/goog/demos/autocompleteremotedata.js +0 -18
  256. data/closure-library/closure/goog/demos/autocompleterichremote.html +0 -137
  257. data/closure-library/closure/goog/demos/autocompleterichremotedata.js +0 -33
  258. data/closure-library/closure/goog/demos/bidiinput.html +0 -72
  259. data/closure-library/closure/goog/demos/bubble.html +0 -250
  260. data/closure-library/closure/goog/demos/button.html +0 -395
  261. data/closure-library/closure/goog/demos/charcounter.html +0 -57
  262. data/closure-library/closure/goog/demos/charpicker.html +0 -64
  263. data/closure-library/closure/goog/demos/checkbox.html +0 -122
  264. data/closure-library/closure/goog/demos/color-contrast.html +0 -60
  265. data/closure-library/closure/goog/demos/colormenubutton.html +0 -213
  266. data/closure-library/closure/goog/demos/colorpicker.html +0 -43
  267. data/closure-library/closure/goog/demos/combobox.html +0 -125
  268. data/closure-library/closure/goog/demos/container.html +0 -670
  269. data/closure-library/closure/goog/demos/control.html +0 -477
  270. data/closure-library/closure/goog/demos/css/demo.css +0 -75
  271. data/closure-library/closure/goog/demos/css/emojipicker.css +0 -36
  272. data/closure-library/closure/goog/demos/css/emojisprite.css +0 -92
  273. data/closure-library/closure/goog/demos/css3button.html +0 -166
  274. data/closure-library/closure/goog/demos/css3menubutton.html +0 -285
  275. data/closure-library/closure/goog/demos/cssspriteanimation.html +0 -80
  276. data/closure-library/closure/goog/demos/datepicker.html +0 -183
  277. data/closure-library/closure/goog/demos/debug.html +0 -119
  278. data/closure-library/closure/goog/demos/depsgraph.html +0 -221
  279. data/closure-library/closure/goog/demos/dialog.html +0 -156
  280. data/closure-library/closure/goog/demos/dimensionpicker.html +0 -108
  281. data/closure-library/closure/goog/demos/dimensionpicker_rtl.html +0 -123
  282. data/closure-library/closure/goog/demos/dom_selection.html +0 -88
  283. data/closure-library/closure/goog/demos/drag.html +0 -191
  284. data/closure-library/closure/goog/demos/dragdrop.html +0 -263
  285. data/closure-library/closure/goog/demos/dragdropdetector.html +0 -46
  286. data/closure-library/closure/goog/demos/dragdropdetector_target.html +0 -17
  287. data/closure-library/closure/goog/demos/dragger.html +0 -83
  288. data/closure-library/closure/goog/demos/draglistgroup.html +0 -261
  289. data/closure-library/closure/goog/demos/drilldownrow.html +0 -78
  290. data/closure-library/closure/goog/demos/editor/deps.js +0 -20
  291. data/closure-library/closure/goog/demos/editor/editor.html +0 -139
  292. data/closure-library/closure/goog/demos/editor/field_basic.html +0 -74
  293. data/closure-library/closure/goog/demos/editor/helloworld.html +0 -91
  294. data/closure-library/closure/goog/demos/editor/helloworld.js +0 -81
  295. data/closure-library/closure/goog/demos/editor/helloworld_test.html +0 -75
  296. data/closure-library/closure/goog/demos/editor/helloworlddialog.js +0 -163
  297. data/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +0 -100
  298. data/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +0 -110
  299. data/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +0 -198
  300. data/closure-library/closure/goog/demos/editor/seamlessfield.html +0 -106
  301. data/closure-library/closure/goog/demos/effects.html +0 -142
  302. data/closure-library/closure/goog/demos/emoji/200.gif +0 -0
  303. data/closure-library/closure/goog/demos/emoji/201.gif +0 -0
  304. data/closure-library/closure/goog/demos/emoji/202.gif +0 -0
  305. data/closure-library/closure/goog/demos/emoji/203.gif +0 -0
  306. data/closure-library/closure/goog/demos/emoji/204.gif +0 -0
  307. data/closure-library/closure/goog/demos/emoji/205.gif +0 -0
  308. data/closure-library/closure/goog/demos/emoji/206.gif +0 -0
  309. data/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
  310. data/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
  311. data/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
  312. data/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
  313. data/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
  314. data/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
  315. data/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
  316. data/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
  317. data/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
  318. data/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
  319. data/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
  320. data/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
  321. data/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
  322. data/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
  323. data/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
  324. data/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
  325. data/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
  326. data/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
  327. data/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
  328. data/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
  329. data/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
  330. data/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
  331. data/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
  332. data/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
  333. data/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
  334. data/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
  335. data/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
  336. data/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
  337. data/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
  338. data/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
  339. data/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
  340. data/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
  341. data/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
  342. data/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
  343. data/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
  344. data/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
  345. data/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
  346. data/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
  347. data/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
  348. data/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
  349. data/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
  350. data/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
  351. data/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
  352. data/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
  353. data/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
  354. data/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
  355. data/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
  356. data/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
  357. data/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
  358. data/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
  359. data/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
  360. data/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
  361. data/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
  362. data/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
  363. data/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
  364. data/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
  365. data/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
  366. data/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
  367. data/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
  368. data/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
  369. data/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
  370. data/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
  371. data/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
  372. data/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
  373. data/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
  374. data/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
  375. data/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
  376. data/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
  377. data/closure-library/closure/goog/demos/emoji/none.gif +0 -0
  378. data/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
  379. data/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
  380. data/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
  381. data/closure-library/closure/goog/demos/event-propagation.html +0 -192
  382. data/closure-library/closure/goog/demos/events.html +0 -99
  383. data/closure-library/closure/goog/demos/eventtarget.html +0 -70
  384. data/closure-library/closure/goog/demos/filedrophandler.html +0 -63
  385. data/closure-library/closure/goog/demos/filteredmenu.html +0 -118
  386. data/closure-library/closure/goog/demos/focushandler.html +0 -58
  387. data/closure-library/closure/goog/demos/gauge.html +0 -158
  388. data/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +0 -141
  389. data/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +0 -130
  390. data/closure-library/closure/goog/demos/graphics/basicelements.html +0 -264
  391. data/closure-library/closure/goog/demos/graphics/events.html +0 -113
  392. data/closure-library/closure/goog/demos/graphics/modifyelements.html +0 -195
  393. data/closure-library/closure/goog/demos/graphics/subpixel.html +0 -80
  394. data/closure-library/closure/goog/demos/graphics/tiger.html +0 -105
  395. data/closure-library/closure/goog/demos/graphics/tigerdata.js +0 -2840
  396. data/closure-library/closure/goog/demos/history1.html +0 -132
  397. data/closure-library/closure/goog/demos/history2.html +0 -100
  398. data/closure-library/closure/goog/demos/history3.html +0 -106
  399. data/closure-library/closure/goog/demos/history3js.html +0 -36
  400. data/closure-library/closure/goog/demos/history_blank.html +0 -25
  401. data/closure-library/closure/goog/demos/hovercard.html +0 -177
  402. data/closure-library/closure/goog/demos/hsvapalette.html +0 -55
  403. data/closure-library/closure/goog/demos/hsvpalette.html +0 -56
  404. data/closure-library/closure/goog/demos/html5history.html +0 -87
  405. data/closure-library/closure/goog/demos/imagelessbutton.html +0 -221
  406. data/closure-library/closure/goog/demos/imagelessmenubutton.html +0 -285
  407. data/closure-library/closure/goog/demos/imagelessroundedcorner.html +0 -231
  408. data/closure-library/closure/goog/demos/index.html +0 -19
  409. data/closure-library/closure/goog/demos/index_nav.html +0 -253
  410. data/closure-library/closure/goog/demos/index_splash.html +0 -22
  411. data/closure-library/closure/goog/demos/inline_block_quirks.html +0 -125
  412. data/closure-library/closure/goog/demos/inline_block_standards.html +0 -126
  413. data/closure-library/closure/goog/demos/inputdatepicker.html +0 -60
  414. data/closure-library/closure/goog/demos/inputhandler.html +0 -72
  415. data/closure-library/closure/goog/demos/jsonprettyprinter.html +0 -80
  416. data/closure-library/closure/goog/demos/keyboardshortcuts.html +0 -112
  417. data/closure-library/closure/goog/demos/keyhandler.html +0 -127
  418. data/closure-library/closure/goog/demos/labelinput.html +0 -42
  419. data/closure-library/closure/goog/demos/menu.html +0 -220
  420. data/closure-library/closure/goog/demos/menubutton.html +0 -318
  421. data/closure-library/closure/goog/demos/mousewheelhandler.html +0 -109
  422. data/closure-library/closure/goog/demos/offline.html +0 -268
  423. data/closure-library/closure/goog/demos/onlinehandler.html +0 -77
  424. data/closure-library/closure/goog/demos/palette.html +0 -302
  425. data/closure-library/closure/goog/demos/pastehandler.html +0 -54
  426. data/closure-library/closure/goog/demos/plaintextspellchecker.html +0 -106
  427. data/closure-library/closure/goog/demos/popup.html +0 -200
  428. data/closure-library/closure/goog/demos/popupcolorpicker.html +0 -49
  429. data/closure-library/closure/goog/demos/popupdatepicker.html +0 -53
  430. data/closure-library/closure/goog/demos/popupemojipicker.html +0 -407
  431. data/closure-library/closure/goog/demos/popupmenu.html +0 -89
  432. data/closure-library/closure/goog/demos/progressbar.html +0 -97
  433. data/closure-library/closure/goog/demos/prompt.html +0 -92
  434. data/closure-library/closure/goog/demos/quadtree.html +0 -107
  435. data/closure-library/closure/goog/demos/ratings.html +0 -120
  436. data/closure-library/closure/goog/demos/richtextspellchecker.html +0 -92
  437. data/closure-library/closure/goog/demos/roundedpanel.html +0 -139
  438. data/closure-library/closure/goog/demos/samplecomponent.html +0 -75
  439. data/closure-library/closure/goog/demos/samplecomponent.js +0 -206
  440. data/closure-library/closure/goog/demos/scrollfloater.html +0 -117
  441. data/closure-library/closure/goog/demos/select.html +0 -324
  442. data/closure-library/closure/goog/demos/selectionmenubutton.html +0 -186
  443. data/closure-library/closure/goog/demos/serverchart.html +0 -122
  444. data/closure-library/closure/goog/demos/silverlightclipboardbutton.html +0 -71
  445. data/closure-library/closure/goog/demos/slider.html +0 -110
  446. data/closure-library/closure/goog/demos/splitbehavior.html +0 -164
  447. data/closure-library/closure/goog/demos/splitpane.html +0 -243
  448. data/closure-library/closure/goog/demos/stopevent.html +0 -171
  449. data/closure-library/closure/goog/demos/submenus.html +0 -130
  450. data/closure-library/closure/goog/demos/submenus2.html +0 -150
  451. data/closure-library/closure/goog/demos/tabbar.html +0 -289
  452. data/closure-library/closure/goog/demos/tablesorter.html +0 -116
  453. data/closure-library/closure/goog/demos/tabpane.html +0 -302
  454. data/closure-library/closure/goog/demos/textarea.html +0 -128
  455. data/closure-library/closure/goog/demos/timers.html +0 -291
  456. data/closure-library/closure/goog/demos/toolbar.html +0 -703
  457. data/closure-library/closure/goog/demos/tooltip.html +0 -91
  458. data/closure-library/closure/goog/demos/tracer.html +0 -92
  459. data/closure-library/closure/goog/demos/tree/demo.html +0 -126
  460. data/closure-library/closure/goog/demos/tree/testdata.js +0 -260
  461. data/closure-library/closure/goog/demos/tweakui.html +0 -121
  462. data/closure-library/closure/goog/demos/twothumbslider.html +0 -121
  463. data/closure-library/closure/goog/demos/useragent.html +0 -173
  464. data/closure-library/closure/goog/demos/viewportsizemonitor.html +0 -71
  465. data/closure-library/closure/goog/demos/xpc/blank.html +0 -7
  466. data/closure-library/closure/goog/demos/xpc/index.html +0 -89
  467. data/closure-library/closure/goog/demos/xpc/inner.html +0 -58
  468. data/closure-library/closure/goog/demos/xpc/minimal/blank.html +0 -7
  469. data/closure-library/closure/goog/demos/xpc/minimal/index.html +0 -105
  470. data/closure-library/closure/goog/demos/xpc/minimal/inner.html +0 -75
  471. data/closure-library/closure/goog/demos/xpc/minimal/relay.html +0 -7
  472. data/closure-library/closure/goog/demos/xpc/relay.html +0 -7
  473. data/closure-library/closure/goog/demos/xpc/xpcdemo.js +0 -304
  474. data/closure-library/closure/goog/demos/zippy.html +0 -127
  475. data/closure-library/closure/goog/deps.js +0 -679
  476. data/closure-library/closure/goog/disposable/disposable.js +0 -167
  477. data/closure-library/closure/goog/disposable/disposable_test.html +0 -202
  478. data/closure-library/closure/goog/dom/a11y.js +0 -438
  479. data/closure-library/closure/goog/dom/a11y_test.html +0 -86
  480. data/closure-library/closure/goog/dom/abstractmultirange.js +0 -77
  481. data/closure-library/closure/goog/dom/abstractrange.js +0 -514
  482. data/closure-library/closure/goog/dom/abstractrange_test.html +0 -73
  483. data/closure-library/closure/goog/dom/annotate.js +0 -352
  484. data/closure-library/closure/goog/dom/annotate_test.html +0 -187
  485. data/closure-library/closure/goog/dom/browserfeature.js +0 -50
  486. data/closure-library/closure/goog/dom/browserrange/abstractrange.js +0 -316
  487. data/closure-library/closure/goog/dom/browserrange/browserrange.js +0 -149
  488. data/closure-library/closure/goog/dom/browserrange/browserrange_test.html +0 -562
  489. data/closure-library/closure/goog/dom/browserrange/geckorange.js +0 -82
  490. data/closure-library/closure/goog/dom/browserrange/ierange.js +0 -970
  491. data/closure-library/closure/goog/dom/browserrange/operarange.js +0 -83
  492. data/closure-library/closure/goog/dom/browserrange/w3crange.js +0 -364
  493. data/closure-library/closure/goog/dom/browserrange/webkitrange.js +0 -112
  494. data/closure-library/closure/goog/dom/classes.js +0 -233
  495. data/closure-library/closure/goog/dom/classes_test.html +0 -228
  496. data/closure-library/closure/goog/dom/controlrange.js +0 -511
  497. data/closure-library/closure/goog/dom/controlrange_test.html +0 -246
  498. data/closure-library/closure/goog/dom/dataset.js +0 -90
  499. data/closure-library/closure/goog/dom/dataset_test.html +0 -104
  500. data/closure-library/closure/goog/dom/dom.js +0 -2424
  501. data/closure-library/closure/goog/dom/dom_quirks_test.html +0 -104
  502. data/closure-library/closure/goog/dom/dom_test.html +0 -103
  503. data/closure-library/closure/goog/dom/dom_test.js +0 -1129
  504. data/closure-library/closure/goog/dom/fontsizemonitor.js +0 -159
  505. data/closure-library/closure/goog/dom/fontsizemonitor_test.html +0 -283
  506. data/closure-library/closure/goog/dom/forms.js +0 -403
  507. data/closure-library/closure/goog/dom/forms_test.html +0 -483
  508. data/closure-library/closure/goog/dom/iframe.js +0 -128
  509. data/closure-library/closure/goog/dom/iframe_test.html +0 -87
  510. data/closure-library/closure/goog/dom/iter.js +0 -127
  511. data/closure-library/closure/goog/dom/iter_test.html +0 -97
  512. data/closure-library/closure/goog/dom/multirange.js +0 -519
  513. data/closure-library/closure/goog/dom/multirange_test.html +0 -67
  514. data/closure-library/closure/goog/dom/nodeiterator.js +0 -85
  515. data/closure-library/closure/goog/dom/nodeiterator_test.html +0 -49
  516. data/closure-library/closure/goog/dom/nodeoffset.js +0 -111
  517. data/closure-library/closure/goog/dom/nodeoffset_test.html +0 -88
  518. data/closure-library/closure/goog/dom/pattern/abstractpattern.js +0 -60
  519. data/closure-library/closure/goog/dom/pattern/allchildren.js +0 -73
  520. data/closure-library/closure/goog/dom/pattern/callback/callback.js +0 -82
  521. data/closure-library/closure/goog/dom/pattern/callback/counter.js +0 -72
  522. data/closure-library/closure/goog/dom/pattern/callback/test.js +0 -77
  523. data/closure-library/closure/goog/dom/pattern/childmatches.js +0 -152
  524. data/closure-library/closure/goog/dom/pattern/endtag.js +0 -53
  525. data/closure-library/closure/goog/dom/pattern/fulltag.js +0 -92
  526. data/closure-library/closure/goog/dom/pattern/matcher.js +0 -150
  527. data/closure-library/closure/goog/dom/pattern/matcher_test.html +0 -204
  528. data/closure-library/closure/goog/dom/pattern/nodetype.js +0 -57
  529. data/closure-library/closure/goog/dom/pattern/pattern.js +0 -93
  530. data/closure-library/closure/goog/dom/pattern/pattern_test.html +0 -614
  531. data/closure-library/closure/goog/dom/pattern/repeat.js +0 -188
  532. data/closure-library/closure/goog/dom/pattern/sequence.js +0 -139
  533. data/closure-library/closure/goog/dom/pattern/starttag.js +0 -53
  534. data/closure-library/closure/goog/dom/pattern/tag.js +0 -149
  535. data/closure-library/closure/goog/dom/pattern/text.js +0 -69
  536. data/closure-library/closure/goog/dom/range.js +0 -220
  537. data/closure-library/closure/goog/dom/range_test.html +0 -702
  538. data/closure-library/closure/goog/dom/rangeendpoint.js +0 -32
  539. data/closure-library/closure/goog/dom/savedcaretrange.js +0 -203
  540. data/closure-library/closure/goog/dom/savedcaretrange_test.html +0 -235
  541. data/closure-library/closure/goog/dom/savedrange.js +0 -74
  542. data/closure-library/closure/goog/dom/savedrange_test.html +0 -61
  543. data/closure-library/closure/goog/dom/selection.js +0 -470
  544. data/closure-library/closure/goog/dom/selection_test.html +0 -329
  545. data/closure-library/closure/goog/dom/tagiterator.js +0 -365
  546. data/closure-library/closure/goog/dom/tagiterator_test.html +0 -589
  547. data/closure-library/closure/goog/dom/tagname.js +0 -121
  548. data/closure-library/closure/goog/dom/tagname_test.html +0 -37
  549. data/closure-library/closure/goog/dom/textrange.js +0 -611
  550. data/closure-library/closure/goog/dom/textrange_test.html +0 -127
  551. data/closure-library/closure/goog/dom/textrangeiterator.js +0 -246
  552. data/closure-library/closure/goog/dom/textrangeiterator_test.html +0 -142
  553. data/closure-library/closure/goog/dom/viewportsizemonitor.js +0 -220
  554. data/closure-library/closure/goog/dom/viewportsizemonitor_test.html +0 -166
  555. data/closure-library/closure/goog/dom/xml.js +0 -187
  556. data/closure-library/closure/goog/dom/xml_test.html +0 -77
  557. data/closure-library/closure/goog/editor/browserfeature.js +0 -251
  558. data/closure-library/closure/goog/editor/browserfeature_test.html +0 -124
  559. data/closure-library/closure/goog/editor/clicktoeditwrapper.js +0 -438
  560. data/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +0 -137
  561. data/closure-library/closure/goog/editor/command.js +0 -74
  562. data/closure-library/closure/goog/editor/defines.js +0 -34
  563. data/closure-library/closure/goog/editor/field.js +0 -2594
  564. data/closure-library/closure/goog/editor/field_test.html +0 -1000
  565. data/closure-library/closure/goog/editor/focus.js +0 -32
  566. data/closure-library/closure/goog/editor/focus_test.html +0 -66
  567. data/closure-library/closure/goog/editor/icontent.js +0 -296
  568. data/closure-library/closure/goog/editor/icontent_test.html +0 -209
  569. data/closure-library/closure/goog/editor/link.js +0 -279
  570. data/closure-library/closure/goog/editor/link_test.html +0 -234
  571. data/closure-library/closure/goog/editor/node.js +0 -435
  572. data/closure-library/closure/goog/editor/node_test.html +0 -590
  573. data/closure-library/closure/goog/editor/plugin.js +0 -444
  574. data/closure-library/closure/goog/editor/plugin_test.html +0 -187
  575. data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +0 -535
  576. data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +0 -227
  577. data/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +0 -336
  578. data/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +0 -399
  579. data/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +0 -78
  580. data/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +0 -91
  581. data/closure-library/closure/goog/editor/plugins/basictextformatter.js +0 -1740
  582. data/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +0 -1171
  583. data/closure-library/closure/goog/editor/plugins/blockquote.js +0 -422
  584. data/closure-library/closure/goog/editor/plugins/blockquote_test.html +0 -149
  585. data/closure-library/closure/goog/editor/plugins/emoticons.js +0 -83
  586. data/closure-library/closure/goog/editor/plugins/emoticons_test.html +0 -67
  587. data/closure-library/closure/goog/editor/plugins/enterhandler.js +0 -730
  588. data/closure-library/closure/goog/editor/plugins/enterhandler_test.html +0 -739
  589. data/closure-library/closure/goog/editor/plugins/headerformatter.js +0 -95
  590. data/closure-library/closure/goog/editor/plugins/headerformatter_test.html +0 -100
  591. data/closure-library/closure/goog/editor/plugins/linkbubble.js +0 -458
  592. data/closure-library/closure/goog/editor/plugins/linkbubble_test.html +0 -309
  593. data/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +0 -222
  594. data/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +0 -370
  595. data/closure-library/closure/goog/editor/plugins/listtabhandler.js +0 -66
  596. data/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +0 -177
  597. data/closure-library/closure/goog/editor/plugins/loremipsum.js +0 -186
  598. data/closure-library/closure/goog/editor/plugins/loremipsum_test.html +0 -169
  599. data/closure-library/closure/goog/editor/plugins/removeformatting.js +0 -772
  600. data/closure-library/closure/goog/editor/plugins/removeformatting_test.html +0 -920
  601. data/closure-library/closure/goog/editor/plugins/spacestabhandler.js +0 -93
  602. data/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +0 -186
  603. data/closure-library/closure/goog/editor/plugins/tableeditor.js +0 -496
  604. data/closure-library/closure/goog/editor/plugins/tableeditor_test.html +0 -299
  605. data/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +0 -741
  606. data/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +0 -481
  607. data/closure-library/closure/goog/editor/plugins/undoredo.js +0 -1014
  608. data/closure-library/closure/goog/editor/plugins/undoredo_test.html +0 -525
  609. data/closure-library/closure/goog/editor/plugins/undoredomanager.js +0 -337
  610. data/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +0 -394
  611. data/closure-library/closure/goog/editor/plugins/undoredostate.js +0 -84
  612. data/closure-library/closure/goog/editor/plugins/undoredostate_test.html +0 -44
  613. data/closure-library/closure/goog/editor/range.js +0 -602
  614. data/closure-library/closure/goog/editor/range_test.html +0 -880
  615. data/closure-library/closure/goog/editor/seamlessfield.js +0 -720
  616. data/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +0 -30
  617. data/closure-library/closure/goog/editor/seamlessfield_test.html +0 -33
  618. data/closure-library/closure/goog/editor/seamlessfield_test.js +0 -392
  619. data/closure-library/closure/goog/editor/style.js +0 -222
  620. data/closure-library/closure/goog/editor/style_test.html +0 -177
  621. data/closure-library/closure/goog/editor/table.js +0 -566
  622. data/closure-library/closure/goog/editor/table_test.html +0 -522
  623. data/closure-library/closure/goog/events/actioneventwrapper.js +0 -131
  624. data/closure-library/closure/goog/events/actioneventwrapper_test.html +0 -176
  625. data/closure-library/closure/goog/events/actionhandler.js +0 -189
  626. data/closure-library/closure/goog/events/actionhandler_test.html +0 -82
  627. data/closure-library/closure/goog/events/browserevent.js +0 -412
  628. data/closure-library/closure/goog/events/browserevent_test.html +0 -145
  629. data/closure-library/closure/goog/events/browserfeature.js +0 -43
  630. data/closure-library/closure/goog/events/event.js +0 -123
  631. data/closure-library/closure/goog/events/event_test.html +0 -70
  632. data/closure-library/closure/goog/events/eventhandler.js +0 -348
  633. data/closure-library/closure/goog/events/eventhandler_test.html +0 -230
  634. data/closure-library/closure/goog/events/events.js +0 -1101
  635. data/closure-library/closure/goog/events/events_test.html +0 -362
  636. data/closure-library/closure/goog/events/eventtarget.js +0 -197
  637. data/closure-library/closure/goog/events/eventtarget_test.html +0 -423
  638. data/closure-library/closure/goog/events/eventtype.js +0 -107
  639. data/closure-library/closure/goog/events/eventwrapper.js +0 -67
  640. data/closure-library/closure/goog/events/filedrophandler.js +0 -224
  641. data/closure-library/closure/goog/events/filedrophandler_test.html +0 -258
  642. data/closure-library/closure/goog/events/focushandler.js +0 -111
  643. data/closure-library/closure/goog/events/imehandler.js +0 -365
  644. data/closure-library/closure/goog/events/imehandler_test.html +0 -271
  645. data/closure-library/closure/goog/events/inputhandler.js +0 -218
  646. data/closure-library/closure/goog/events/keycodes.js +0 -314
  647. data/closure-library/closure/goog/events/keycodes_test.html +0 -72
  648. data/closure-library/closure/goog/events/keyhandler.js +0 -522
  649. data/closure-library/closure/goog/events/keyhandler_test.html +0 -621
  650. data/closure-library/closure/goog/events/keynames.js +0 -124
  651. data/closure-library/closure/goog/events/listener.js +0 -160
  652. data/closure-library/closure/goog/events/mousewheelhandler.js +0 -280
  653. data/closure-library/closure/goog/events/mousewheelhandler_test.html +0 -331
  654. data/closure-library/closure/goog/events/onlinehandler.js +0 -176
  655. data/closure-library/closure/goog/events/onlinelistener_test.html +0 -214
  656. data/closure-library/closure/goog/events/pastehandler.js +0 -444
  657. data/closure-library/closure/goog/events/pastehandler_test.html +0 -354
  658. data/closure-library/closure/goog/events/pools.js +0 -342
  659. data/closure-library/closure/goog/format/emailaddress.js +0 -329
  660. data/closure-library/closure/goog/format/emailaddress_test.html +0 -179
  661. data/closure-library/closure/goog/format/format.js +0 -451
  662. data/closure-library/closure/goog/format/format_test.html +0 -257
  663. data/closure-library/closure/goog/format/htmlprettyprinter.js +0 -406
  664. data/closure-library/closure/goog/format/htmlprettyprinter_test.html +0 -205
  665. data/closure-library/closure/goog/format/jsonprettyprinter.js +0 -405
  666. data/closure-library/closure/goog/format/jsonprettyprinter_test.html +0 -111
  667. data/closure-library/closure/goog/fs/entry.js +0 -406
  668. data/closure-library/closure/goog/fs/error.js +0 -103
  669. data/closure-library/closure/goog/fs/filesaver.js +0 -214
  670. data/closure-library/closure/goog/fs/filesystem.js +0 -59
  671. data/closure-library/closure/goog/fs/filewriter.js +0 -106
  672. data/closure-library/closure/goog/fs/fs.js +0 -183
  673. data/closure-library/closure/goog/fs/fs_test.html +0 -270
  674. data/closure-library/closure/goog/functions/functions.js +0 -219
  675. data/closure-library/closure/goog/functions/functions_test.html +0 -198
  676. data/closure-library/closure/goog/fx/abstractdragdrop.js +0 -1451
  677. data/closure-library/closure/goog/fx/abstractdragdrop_test.html +0 -430
  678. data/closure-library/closure/goog/fx/animation.js +0 -621
  679. data/closure-library/closure/goog/fx/animationqueue.js +0 -348
  680. data/closure-library/closure/goog/fx/cssspriteanimation.js +0 -112
  681. data/closure-library/closure/goog/fx/cssspriteanimation_test.html +0 -125
  682. data/closure-library/closure/goog/fx/dom.js +0 -610
  683. data/closure-library/closure/goog/fx/dragdrop.js +0 -49
  684. data/closure-library/closure/goog/fx/dragdropgroup.js +0 -107
  685. data/closure-library/closure/goog/fx/dragdropgroup_test.html +0 -234
  686. data/closure-library/closure/goog/fx/dragger.js +0 -731
  687. data/closure-library/closure/goog/fx/dragger_test.html +0 -415
  688. data/closure-library/closure/goog/fx/draglistgroup.js +0 -1159
  689. data/closure-library/closure/goog/fx/draglistgroup_test.html +0 -231
  690. data/closure-library/closure/goog/fx/dragscrollsupport.js +0 -274
  691. data/closure-library/closure/goog/fx/dragscrollsupport_test.html +0 -253
  692. data/closure-library/closure/goog/fx/easing.js +0 -50
  693. data/closure-library/closure/goog/fx/fx.js +0 -30
  694. data/closure-library/closure/goog/fx/fx_test.html +0 -157
  695. data/closure-library/closure/goog/gears/basestore.js +0 -523
  696. data/closure-library/closure/goog/gears/basestore_test.html +0 -247
  697. data/closure-library/closure/goog/gears/database.js +0 -935
  698. data/closure-library/closure/goog/gears/database_test.html +0 -699
  699. data/closure-library/closure/goog/gears/fakeworkerpool.js +0 -252
  700. data/closure-library/closure/goog/gears/fakeworkerpool_test.html +0 -188
  701. data/closure-library/closure/goog/gears/gears.js +0 -228
  702. data/closure-library/closure/goog/gears/gears_test.html +0 -78
  703. data/closure-library/closure/goog/gears/httprequest.js +0 -77
  704. data/closure-library/closure/goog/gears/loggerclient.js +0 -131
  705. data/closure-library/closure/goog/gears/loggerclient_test.html +0 -171
  706. data/closure-library/closure/goog/gears/loggerserver.js +0 -158
  707. data/closure-library/closure/goog/gears/loggerserver_test.html +0 -118
  708. data/closure-library/closure/goog/gears/logstore.js +0 -479
  709. data/closure-library/closure/goog/gears/logstore_test.html +0 -600
  710. data/closure-library/closure/goog/gears/managedresourcestore.js +0 -553
  711. data/closure-library/closure/goog/gears/managedresourcestore_test.html +0 -453
  712. data/closure-library/closure/goog/gears/multipartformdata.js +0 -203
  713. data/closure-library/closure/goog/gears/multipartformdata_test.html +0 -220
  714. data/closure-library/closure/goog/gears/statustype.js +0 -37
  715. data/closure-library/closure/goog/gears/urlcapture.js +0 -370
  716. data/closure-library/closure/goog/gears/urlcapture_test.html +0 -392
  717. data/closure-library/closure/goog/gears/worker.js +0 -201
  718. data/closure-library/closure/goog/gears/workerchannel.js +0 -205
  719. data/closure-library/closure/goog/gears/workerchannel_test.html +0 -207
  720. data/closure-library/closure/goog/gears/workerpool.js +0 -241
  721. data/closure-library/closure/goog/gears/workerpool_test.html +0 -203
  722. data/closure-library/closure/goog/graphics/abstractgraphics.js +0 -439
  723. data/closure-library/closure/goog/graphics/affinetransform.js +0 -497
  724. data/closure-library/closure/goog/graphics/affinetransform_test.html +0 -316
  725. data/closure-library/closure/goog/graphics/canvaselement.js +0 -776
  726. data/closure-library/closure/goog/graphics/canvasgraphics.js +0 -632
  727. data/closure-library/closure/goog/graphics/element.js +0 -145
  728. data/closure-library/closure/goog/graphics/ellipseelement.js +0 -59
  729. data/closure-library/closure/goog/graphics/ext/coordinates.js +0 -158
  730. data/closure-library/closure/goog/graphics/ext/coordinates_test.html +0 -74
  731. data/closure-library/closure/goog/graphics/ext/element.js +0 -970
  732. data/closure-library/closure/goog/graphics/ext/element_test.html +0 -144
  733. data/closure-library/closure/goog/graphics/ext/ellipse.js +0 -58
  734. data/closure-library/closure/goog/graphics/ext/ext.js +0 -29
  735. data/closure-library/closure/goog/graphics/ext/graphics.js +0 -209
  736. data/closure-library/closure/goog/graphics/ext/group.js +0 -213
  737. data/closure-library/closure/goog/graphics/ext/image.js +0 -62
  738. data/closure-library/closure/goog/graphics/ext/path.js +0 -140
  739. data/closure-library/closure/goog/graphics/ext/path_test.html +0 -46
  740. data/closure-library/closure/goog/graphics/ext/rectangle.js +0 -53
  741. data/closure-library/closure/goog/graphics/ext/shape.js +0 -144
  742. data/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +0 -69
  743. data/closure-library/closure/goog/graphics/fill.js +0 -29
  744. data/closure-library/closure/goog/graphics/font.js +0 -59
  745. data/closure-library/closure/goog/graphics/graphics.js +0 -124
  746. data/closure-library/closure/goog/graphics/groupelement.js +0 -54
  747. data/closure-library/closure/goog/graphics/imageelement.js +0 -67
  748. data/closure-library/closure/goog/graphics/lineargradient.js +0 -131
  749. data/closure-library/closure/goog/graphics/path.js +0 -508
  750. data/closure-library/closure/goog/graphics/path_test.html +0 -359
  751. data/closure-library/closure/goog/graphics/pathelement.js +0 -50
  752. data/closure-library/closure/goog/graphics/paths.js +0 -86
  753. data/closure-library/closure/goog/graphics/paths_test.html +0 -97
  754. data/closure-library/closure/goog/graphics/rectelement.js +0 -59
  755. data/closure-library/closure/goog/graphics/solidfill.js +0 -70
  756. data/closure-library/closure/goog/graphics/stroke.js +0 -63
  757. data/closure-library/closure/goog/graphics/strokeandfillelement.js +0 -110
  758. data/closure-library/closure/goog/graphics/svgelement.js +0 -262
  759. data/closure-library/closure/goog/graphics/svggraphics.js +0 -813
  760. data/closure-library/closure/goog/graphics/textelement.js +0 -51
  761. data/closure-library/closure/goog/graphics/vmlelement.js +0 -380
  762. data/closure-library/closure/goog/graphics/vmlgraphics.js +0 -863
  763. data/closure-library/closure/goog/history/event.js +0 -54
  764. data/closure-library/closure/goog/history/eventtype.js +0 -30
  765. data/closure-library/closure/goog/history/history.js +0 -979
  766. data/closure-library/closure/goog/history/html5history.js +0 -303
  767. data/closure-library/closure/goog/history/html5history_test.html +0 -163
  768. data/closure-library/closure/goog/i18n/bidi.js +0 -772
  769. data/closure-library/closure/goog/i18n/bidi_test.html +0 -414
  770. data/closure-library/closure/goog/i18n/bidiformatter.js +0 -488
  771. data/closure-library/closure/goog/i18n/bidiformatter_test.html +0 -343
  772. data/closure-library/closure/goog/i18n/charlistdecompressor.js +0 -157
  773. data/closure-library/closure/goog/i18n/charlistdecompressor_test.html +0 -65
  774. data/closure-library/closure/goog/i18n/charpickerdata.js +0 -3185
  775. data/closure-library/closure/goog/i18n/currency.js +0 -385
  776. data/closure-library/closure/goog/i18n/currency_test.html +0 -202
  777. data/closure-library/closure/goog/i18n/currencycodemap.js +0 -210
  778. data/closure-library/closure/goog/i18n/datetimeformat.js +0 -636
  779. data/closure-library/closure/goog/i18n/datetimeformat_test.html +0 -436
  780. data/closure-library/closure/goog/i18n/datetimeparse.js +0 -1111
  781. data/closure-library/closure/goog/i18n/datetimeparse_test.html +0 -796
  782. data/closure-library/closure/goog/i18n/datetimepatterns.js +0 -1586
  783. data/closure-library/closure/goog/i18n/datetimepatternsext.js +0 -7386
  784. data/closure-library/closure/goog/i18n/datetimesymbols.js +0 -3350
  785. data/closure-library/closure/goog/i18n/datetimesymbolsext.js +0 -12938
  786. data/closure-library/closure/goog/i18n/graphemebreak.js +0 -181
  787. data/closure-library/closure/goog/i18n/graphemebreak_test.html +0 -72
  788. data/closure-library/closure/goog/i18n/messageformat.js +0 -556
  789. data/closure-library/closure/goog/i18n/messageformat_test.html +0 -334
  790. data/closure-library/closure/goog/i18n/mime.js +0 -100
  791. data/closure-library/closure/goog/i18n/mime_test.html +0 -51
  792. data/closure-library/closure/goog/i18n/numberformat.js +0 -763
  793. data/closure-library/closure/goog/i18n/numberformat_test.html +0 -605
  794. data/closure-library/closure/goog/i18n/numberformatsymbols.js +0 -10358
  795. data/closure-library/closure/goog/i18n/pluralrules.js +0 -695
  796. data/closure-library/closure/goog/i18n/timezone.js +0 -341
  797. data/closure-library/closure/goog/i18n/timezone_test.html +0 -163
  798. data/closure-library/closure/goog/i18n/uchar.js +0 -1160
  799. data/closure-library/closure/goog/i18n/uchar_test.html +0 -72
  800. data/closure-library/closure/goog/images/blank.gif +0 -0
  801. data/closure-library/closure/goog/images/bubble_close.jpg +0 -0
  802. data/closure-library/closure/goog/images/bubble_left.gif +0 -0
  803. data/closure-library/closure/goog/images/bubble_right.gif +0 -0
  804. data/closure-library/closure/goog/images/button-bg.gif +0 -0
  805. data/closure-library/closure/goog/images/check-outline.gif +0 -0
  806. data/closure-library/closure/goog/images/check-sprite.gif +0 -0
  807. data/closure-library/closure/goog/images/check.gif +0 -0
  808. data/closure-library/closure/goog/images/close_box.gif +0 -0
  809. data/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
  810. data/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
  811. data/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
  812. data/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
  813. data/closure-library/closure/goog/images/dropdn.gif +0 -0
  814. data/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
  815. data/closure-library/closure/goog/images/dropdown.gif +0 -0
  816. data/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
  817. data/closure-library/closure/goog/images/gears_offline.gif +0 -0
  818. data/closure-library/closure/goog/images/gears_online.gif +0 -0
  819. data/closure-library/closure/goog/images/gears_paused.gif +0 -0
  820. data/closure-library/closure/goog/images/gears_syncing.gif +0 -0
  821. data/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
  822. data/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
  823. data/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
  824. data/closure-library/closure/goog/images/hsv-sprite.png +0 -0
  825. data/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
  826. data/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
  827. data/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
  828. data/closure-library/closure/goog/images/hsva-sprite.png +0 -0
  829. data/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
  830. data/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
  831. data/closure-library/closure/goog/images/menu-arrows.gif +0 -0
  832. data/closure-library/closure/goog/images/minus.png +0 -0
  833. data/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
  834. data/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
  835. data/closure-library/closure/goog/images/offlineicons.png +0 -0
  836. data/closure-library/closure/goog/images/plus.png +0 -0
  837. data/closure-library/closure/goog/images/ratingstars.gif +0 -0
  838. data/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
  839. data/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
  840. data/closure-library/closure/goog/images/toolbar-bg.png +0 -0
  841. data/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
  842. data/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
  843. data/closure-library/closure/goog/images/tree/I.png +0 -0
  844. data/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
  845. data/closure-library/closure/goog/images/tree/tree.gif +0 -0
  846. data/closure-library/closure/goog/images/tree/tree.png +0 -0
  847. data/closure-library/closure/goog/images/ui_controls.jpg +0 -0
  848. data/closure-library/closure/goog/iter/iter.js +0 -627
  849. data/closure-library/closure/goog/iter/iter_test.html +0 -443
  850. data/closure-library/closure/goog/json/json.js +0 -302
  851. data/closure-library/closure/goog/json/json_test.html +0 -501
  852. data/closure-library/closure/goog/locale/countries.js +0 -288
  853. data/closure-library/closure/goog/locale/countrylanguagenames_test.html +0 -233
  854. data/closure-library/closure/goog/locale/defaultlocalenameconstants.js +0 -847
  855. data/closure-library/closure/goog/locale/genericfontnames.js +0 -73
  856. data/closure-library/closure/goog/locale/genericfontnames_test.html +0 -97
  857. data/closure-library/closure/goog/locale/genericfontnamesdata.js +0 -328
  858. data/closure-library/closure/goog/locale/locale.js +0 -397
  859. data/closure-library/closure/goog/locale/nativenameconstants.js +0 -1354
  860. data/closure-library/closure/goog/locale/scriptToLanguages.js +0 -482
  861. data/closure-library/closure/goog/locale/timezonedetection.js +0 -117
  862. data/closure-library/closure/goog/locale/timezonedetection_test.html +0 -130
  863. data/closure-library/closure/goog/locale/timezonefingerprint.js +0 -250
  864. data/closure-library/closure/goog/locale/timezonelist.js +0 -129
  865. data/closure-library/closure/goog/locale/timezonelist_test.html +0 -165
  866. data/closure-library/closure/goog/math/bezier.js +0 -244
  867. data/closure-library/closure/goog/math/bezier_test.html +0 -70
  868. data/closure-library/closure/goog/math/box.js +0 -236
  869. data/closure-library/closure/goog/math/box_test.html +0 -139
  870. data/closure-library/closure/goog/math/coordinate.js +0 -136
  871. data/closure-library/closure/goog/math/coordinate3.js +0 -168
  872. data/closure-library/closure/goog/math/coordinate3_test.html +0 -208
  873. data/closure-library/closure/goog/math/coordinate_test.html +0 -92
  874. data/closure-library/closure/goog/math/integer.js +0 -736
  875. data/closure-library/closure/goog/math/integer_test.html +0 -1653
  876. data/closure-library/closure/goog/math/line.js +0 -177
  877. data/closure-library/closure/goog/math/line_test.html +0 -62
  878. data/closure-library/closure/goog/math/long.js +0 -801
  879. data/closure-library/closure/goog/math/long_test.html +0 -1571
  880. data/closure-library/closure/goog/math/math.js +0 -355
  881. data/closure-library/closure/goog/math/math_test.html +0 -254
  882. data/closure-library/closure/goog/math/matrix.js +0 -669
  883. data/closure-library/closure/goog/math/matrix_test.html +0 -427
  884. data/closure-library/closure/goog/math/range.js +0 -146
  885. data/closure-library/closure/goog/math/range_test.html +0 -103
  886. data/closure-library/closure/goog/math/rangeset.js +0 -368
  887. data/closure-library/closure/goog/math/rangeset_test.html +0 -619
  888. data/closure-library/closure/goog/math/rect.js +0 -340
  889. data/closure-library/closure/goog/math/rect_test.html +0 -315
  890. data/closure-library/closure/goog/math/size.js +0 -201
  891. data/closure-library/closure/goog/math/size_test.html +0 -174
  892. data/closure-library/closure/goog/math/vec2.js +0 -255
  893. data/closure-library/closure/goog/math/vec2_test.html +0 -203
  894. data/closure-library/closure/goog/math/vec3.js +0 -308
  895. data/closure-library/closure/goog/math/vec3_test.html +0 -231
  896. data/closure-library/closure/goog/memoize/memoize.js +0 -98
  897. data/closure-library/closure/goog/memoize/memoize_test.html +0 -157
  898. data/closure-library/closure/goog/messaging/abstractchannel.js +0 -209
  899. data/closure-library/closure/goog/messaging/abstractchannel_test.html +0 -90
  900. data/closure-library/closure/goog/messaging/bufferedchannel.js +0 -277
  901. data/closure-library/closure/goog/messaging/bufferedchannel_test.html +0 -205
  902. data/closure-library/closure/goog/messaging/deferredchannel.js +0 -79
  903. data/closure-library/closure/goog/messaging/deferredchannel_test.html +0 -107
  904. data/closure-library/closure/goog/messaging/loggerclient.js +0 -131
  905. data/closure-library/closure/goog/messaging/loggerclient_test.html +0 -102
  906. data/closure-library/closure/goog/messaging/loggerserver.js +0 -94
  907. data/closure-library/closure/goog/messaging/loggerserver_test.html +0 -101
  908. data/closure-library/closure/goog/messaging/messagechannel.js +0 -115
  909. data/closure-library/closure/goog/messaging/messaging.js +0 -34
  910. data/closure-library/closure/goog/messaging/messaging_test.html +0 -42
  911. data/closure-library/closure/goog/messaging/multichannel.js +0 -303
  912. data/closure-library/closure/goog/messaging/multichannel_test.html +0 -122
  913. data/closure-library/closure/goog/messaging/portcaller.js +0 -150
  914. data/closure-library/closure/goog/messaging/portcaller_test.html +0 -66
  915. data/closure-library/closure/goog/messaging/portchannel.js +0 -341
  916. data/closure-library/closure/goog/messaging/portchannel_test.html +0 -359
  917. data/closure-library/closure/goog/messaging/portnetwork.js +0 -78
  918. data/closure-library/closure/goog/messaging/portnetwork_test.html +0 -64
  919. data/closure-library/closure/goog/messaging/portoperator.js +0 -196
  920. data/closure-library/closure/goog/messaging/portoperator_test.html +0 -112
  921. data/closure-library/closure/goog/messaging/testdata/portchannel_inner.html +0 -28
  922. data/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +0 -37
  923. data/closure-library/closure/goog/messaging/testdata/portnetwork_inner.html +0 -35
  924. data/closure-library/closure/goog/messaging/testdata/portnetwork_worker1.js +0 -33
  925. data/closure-library/closure/goog/messaging/testdata/portnetwork_worker2.js +0 -33
  926. data/closure-library/closure/goog/module/abstractmoduleloader.js +0 -46
  927. data/closure-library/closure/goog/module/basemodule.js +0 -45
  928. data/closure-library/closure/goog/module/basemoduleloader.js +0 -210
  929. data/closure-library/closure/goog/module/loader.js +0 -269
  930. data/closure-library/closure/goog/module/module.js +0 -166
  931. data/closure-library/closure/goog/module/moduleinfo.js +0 -336
  932. data/closure-library/closure/goog/module/moduleinfo_test.html +0 -109
  933. data/closure-library/closure/goog/module/moduleloadcallback.js +0 -84
  934. data/closure-library/closure/goog/module/moduleloadcallback_test.html +0 -57
  935. data/closure-library/closure/goog/module/moduleloader.js +0 -250
  936. data/closure-library/closure/goog/module/moduleloader_test.html +0 -244
  937. data/closure-library/closure/goog/module/modulemanager.js +0 -1008
  938. data/closure-library/closure/goog/module/modulemanager_test.html +0 -1240
  939. data/closure-library/closure/goog/module/testdata/modA_1.js +0 -22
  940. data/closure-library/closure/goog/module/testdata/modA_2.js +0 -24
  941. data/closure-library/closure/goog/module/testdata/modB_1.js +0 -24
  942. data/closure-library/closure/goog/net/browserchannel.js +0 -2441
  943. data/closure-library/closure/goog/net/browserchannel_test.html +0 -1176
  944. data/closure-library/closure/goog/net/browsertestchannel.js +0 -552
  945. data/closure-library/closure/goog/net/bulkloader.js +0 -174
  946. data/closure-library/closure/goog/net/bulkloader_test.html +0 -232
  947. data/closure-library/closure/goog/net/bulkloaderhelper.js +0 -129
  948. data/closure-library/closure/goog/net/channeldebug.js +0 -288
  949. data/closure-library/closure/goog/net/channelrequest.js +0 -1125
  950. data/closure-library/closure/goog/net/channelrequest_test.html +0 -158
  951. data/closure-library/closure/goog/net/cookies.js +0 -401
  952. data/closure-library/closure/goog/net/cookies_test.html +0 -255
  953. data/closure-library/closure/goog/net/crossdomainrpc.js +0 -848
  954. data/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
  955. data/closure-library/closure/goog/net/crossdomainrpc_test.html +0 -120
  956. data/closure-library/closure/goog/net/crossdomainrpc_test_response.html +0 -59
  957. data/closure-library/closure/goog/net/errorcode.js +0 -130
  958. data/closure-library/closure/goog/net/eventtype.js +0 -37
  959. data/closure-library/closure/goog/net/iframe_xhr_test.html +0 -142
  960. data/closure-library/closure/goog/net/iframe_xhr_test_response.html +0 -17
  961. data/closure-library/closure/goog/net/iframeio.js +0 -1342
  962. data/closure-library/closure/goog/net/iframeio_different_base_test.data +0 -2
  963. data/closure-library/closure/goog/net/iframeio_different_base_test.html +0 -42
  964. data/closure-library/closure/goog/net/iframeio_test.html +0 -368
  965. data/closure-library/closure/goog/net/iframeloadmonitor.js +0 -199
  966. data/closure-library/closure/goog/net/iframeloadmonitor_test.html +0 -113
  967. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +0 -12
  968. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +0 -12
  969. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +0 -12
  970. data/closure-library/closure/goog/net/imageloader.js +0 -237
  971. data/closure-library/closure/goog/net/imageloader_test.html +0 -200
  972. data/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
  973. data/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
  974. data/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
  975. data/closure-library/closure/goog/net/jsonp.js +0 -379
  976. data/closure-library/closure/goog/net/jsonp_test.html +0 -328
  977. data/closure-library/closure/goog/net/mockiframeio.js +0 -318
  978. data/closure-library/closure/goog/net/mockxhrlite.js +0 -34
  979. data/closure-library/closure/goog/net/mockxhrlite_test.html +0 -109
  980. data/closure-library/closure/goog/net/multiiframeloadmonitor.js +0 -116
  981. data/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +0 -172
  982. data/closure-library/closure/goog/net/networktester.js +0 -383
  983. data/closure-library/closure/goog/net/networktester_test.html +0 -227
  984. data/closure-library/closure/goog/net/tmpnetwork.js +0 -168
  985. data/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +0 -68
  986. data/closure-library/closure/goog/net/xhrio.js +0 -1093
  987. data/closure-library/closure/goog/net/xhrio_test.html +0 -603
  988. data/closure-library/closure/goog/net/xhriopool.js +0 -87
  989. data/closure-library/closure/goog/net/xhrlite.js +0 -119
  990. data/closure-library/closure/goog/net/xhrlite_test.html +0 -156
  991. data/closure-library/closure/goog/net/xhrlitepool.js +0 -37
  992. data/closure-library/closure/goog/net/xhrmanager.js +0 -763
  993. data/closure-library/closure/goog/net/xhrmonitor.js +0 -254
  994. data/closure-library/closure/goog/net/xhrmonitor_test.html +0 -199
  995. data/closure-library/closure/goog/net/xmlhttp.js +0 -215
  996. data/closure-library/closure/goog/net/xmlhttpfactory.js +0 -64
  997. data/closure-library/closure/goog/net/xpc/crosspagechannel.js +0 -624
  998. data/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +0 -422
  999. data/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +0 -251
  1000. data/closure-library/closure/goog/net/xpc/iframepollingtransport.js +0 -822
  1001. data/closure-library/closure/goog/net/xpc/iframerelaytransport.js +0 -288
  1002. data/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +0 -280
  1003. data/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +0 -164
  1004. data/closure-library/closure/goog/net/xpc/nixtransport.js +0 -454
  1005. data/closure-library/closure/goog/net/xpc/relay.js +0 -72
  1006. data/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +0 -106
  1007. data/closure-library/closure/goog/net/xpc/transport.js +0 -104
  1008. data/closure-library/closure/goog/net/xpc/xpc.js +0 -238
  1009. data/closure-library/closure/goog/object/object.js +0 -553
  1010. data/closure-library/closure/goog/object/object_test.html +0 -376
  1011. data/closure-library/closure/goog/positioning/absoluteposition.js +0 -73
  1012. data/closure-library/closure/goog/positioning/abstractposition.js +0 -47
  1013. data/closure-library/closure/goog/positioning/anchoredposition.js +0 -78
  1014. data/closure-library/closure/goog/positioning/anchoredviewportposition.js +0 -126
  1015. data/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +0 -117
  1016. data/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +0 -35
  1017. data/closure-library/closure/goog/positioning/clientposition.js +0 -75
  1018. data/closure-library/closure/goog/positioning/menuanchoredposition.js +0 -97
  1019. data/closure-library/closure/goog/positioning/positioning.js +0 -476
  1020. data/closure-library/closure/goog/positioning/positioning_test.html +0 -877
  1021. data/closure-library/closure/goog/positioning/positioning_test_iframe1.html +0 -16
  1022. data/closure-library/closure/goog/positioning/positioning_test_iframe2.html +0 -13
  1023. data/closure-library/closure/goog/positioning/positioning_test_quirk.html +0 -9
  1024. data/closure-library/closure/goog/positioning/positioning_test_standard.html +0 -13
  1025. data/closure-library/closure/goog/positioning/viewportclientposition.js +0 -102
  1026. data/closure-library/closure/goog/positioning/viewportclientposition_test.html +0 -172
  1027. data/closure-library/closure/goog/positioning/viewportposition.js +0 -63
  1028. data/closure-library/closure/goog/proto/proto.js +0 -43
  1029. data/closure-library/closure/goog/proto/serializer.js +0 -68
  1030. data/closure-library/closure/goog/proto/serializer_test.html +0 -43
  1031. data/closure-library/closure/goog/proto2/descriptor.js +0 -198
  1032. data/closure-library/closure/goog/proto2/descriptor_test.html +0 -60
  1033. data/closure-library/closure/goog/proto2/fielddescriptor.js +0 -288
  1034. data/closure-library/closure/goog/proto2/fielddescriptor_test.html +0 -124
  1035. data/closure-library/closure/goog/proto2/lazydeserializer.js +0 -69
  1036. data/closure-library/closure/goog/proto2/message.js +0 -726
  1037. data/closure-library/closure/goog/proto2/message_test.html +0 -356
  1038. data/closure-library/closure/goog/proto2/objectserializer.js +0 -159
  1039. data/closure-library/closure/goog/proto2/objectserializer_test.html +0 -423
  1040. data/closure-library/closure/goog/proto2/package_test.pb.js +0 -164
  1041. data/closure-library/closure/goog/proto2/pbliteserializer.js +0 -150
  1042. data/closure-library/closure/goog/proto2/pbliteserializer_test.html +0 -267
  1043. data/closure-library/closure/goog/proto2/proto_test.html +0 -693
  1044. data/closure-library/closure/goog/proto2/serializer.js +0 -148
  1045. data/closure-library/closure/goog/proto2/test.pb.js +0 -2820
  1046. data/closure-library/closure/goog/proto2/util.js +0 -54
  1047. data/closure-library/closure/goog/pubsub/pubsub.js +0 -326
  1048. data/closure-library/closure/goog/pubsub/pubsub_test.html +0 -635
  1049. data/closure-library/closure/goog/reflect/reflect.js +0 -50
  1050. data/closure-library/closure/goog/spell/spellcheck.js +0 -474
  1051. data/closure-library/closure/goog/spell/spellcheck_test.html +0 -112
  1052. data/closure-library/closure/goog/string/path.js +0 -100
  1053. data/closure-library/closure/goog/string/path_test.html +0 -59
  1054. data/closure-library/closure/goog/string/string.js +0 -1207
  1055. data/closure-library/closure/goog/string/string_test.html +0 -877
  1056. data/closure-library/closure/goog/string/stringbuffer.js +0 -167
  1057. data/closure-library/closure/goog/string/stringbuffer_test.html +0 -101
  1058. data/closure-library/closure/goog/string/stringformat.js +0 -247
  1059. data/closure-library/closure/goog/string/stringformat_test.html +0 -211
  1060. data/closure-library/closure/goog/structs/avltree.js +0 -769
  1061. data/closure-library/closure/goog/structs/avltree_test.html +0 -241
  1062. data/closure-library/closure/goog/structs/circularbuffer.js +0 -219
  1063. data/closure-library/closure/goog/structs/circularbuffer_test.html +0 -105
  1064. data/closure-library/closure/goog/structs/heap.js +0 -332
  1065. data/closure-library/closure/goog/structs/heap_test.html +0 -220
  1066. data/closure-library/closure/goog/structs/inversionmap.js +0 -159
  1067. data/closure-library/closure/goog/structs/inversionmap_test.html +0 -157
  1068. data/closure-library/closure/goog/structs/linkedmap.js +0 -472
  1069. data/closure-library/closure/goog/structs/linkedmap_test.html +0 -300
  1070. data/closure-library/closure/goog/structs/map.js +0 -446
  1071. data/closure-library/closure/goog/structs/map_test.html +0 -430
  1072. data/closure-library/closure/goog/structs/node.js +0 -74
  1073. data/closure-library/closure/goog/structs/pool.js +0 -344
  1074. data/closure-library/closure/goog/structs/pool_test.html +0 -265
  1075. data/closure-library/closure/goog/structs/prioritypool.js +0 -147
  1076. data/closure-library/closure/goog/structs/prioritypool_test.html +0 -478
  1077. data/closure-library/closure/goog/structs/priorityqueue.js +0 -64
  1078. data/closure-library/closure/goog/structs/priorityqueue_test.html +0 -179
  1079. data/closure-library/closure/goog/structs/quadtree.js +0 -571
  1080. data/closure-library/closure/goog/structs/quadtree_test.html +0 -179
  1081. data/closure-library/closure/goog/structs/queue.js +0 -157
  1082. data/closure-library/closure/goog/structs/queue_test.html +0 -140
  1083. data/closure-library/closure/goog/structs/set.js +0 -251
  1084. data/closure-library/closure/goog/structs/set_test.html +0 -551
  1085. data/closure-library/closure/goog/structs/simplepool.js +0 -203
  1086. data/closure-library/closure/goog/structs/stringset.js +0 -404
  1087. data/closure-library/closure/goog/structs/stringset_test.html +0 -251
  1088. data/closure-library/closure/goog/structs/structs.js +0 -341
  1089. data/closure-library/closure/goog/structs/structs_test.html +0 -1050
  1090. data/closure-library/closure/goog/structs/treenode.js +0 -312
  1091. data/closure-library/closure/goog/structs/treenode_test.html +0 -285
  1092. data/closure-library/closure/goog/structs/trie.js +0 -368
  1093. data/closure-library/closure/goog/structs/trie_test.html +0 -378
  1094. data/closure-library/closure/goog/style/cursor.js +0 -125
  1095. data/closure-library/closure/goog/style/cursor_test.html +0 -131
  1096. data/closure-library/closure/goog/style/style.js +0 -1804
  1097. data/closure-library/closure/goog/style/style_quirks_test.html +0 -1928
  1098. data/closure-library/closure/goog/style/style_test.html +0 -2073
  1099. data/closure-library/closure/goog/style/style_test_iframe_quirk.html +0 -29
  1100. data/closure-library/closure/goog/style/style_test_iframe_standard.html +0 -30
  1101. data/closure-library/closure/goog/style/style_test_quirk.html +0 -9
  1102. data/closure-library/closure/goog/style/style_test_standard.html +0 -11
  1103. data/closure-library/closure/goog/testing/asserts.js +0 -970
  1104. data/closure-library/closure/goog/testing/asserts_test.html +0 -966
  1105. data/closure-library/closure/goog/testing/async/mockcontrol.js +0 -174
  1106. data/closure-library/closure/goog/testing/async/mockcontrol_test.html +0 -224
  1107. data/closure-library/closure/goog/testing/asynctestcase.js +0 -812
  1108. data/closure-library/closure/goog/testing/asynctestcase_async_test.html +0 -102
  1109. data/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +0 -98
  1110. data/closure-library/closure/goog/testing/benchmark.js +0 -87
  1111. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton.js +0 -64
  1112. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton_test.html +0 -58
  1113. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar.js +0 -66
  1114. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar_test.html +0 -49
  1115. data/closure-library/closure/goog/testing/continuationtestcase.js +0 -682
  1116. data/closure-library/closure/goog/testing/continuationtestcase_test.html +0 -349
  1117. data/closure-library/closure/goog/testing/deferredtestcase.js +0 -157
  1118. data/closure-library/closure/goog/testing/deferredtestcase_test.html +0 -152
  1119. data/closure-library/closure/goog/testing/dom.js +0 -596
  1120. data/closure-library/closure/goog/testing/dom_test.html +0 -438
  1121. data/closure-library/closure/goog/testing/editor/dom.js +0 -293
  1122. data/closure-library/closure/goog/testing/editor/dom_test.html +0 -295
  1123. data/closure-library/closure/goog/testing/editor/fieldmock.js +0 -90
  1124. data/closure-library/closure/goog/testing/editor/testhelper.js +0 -168
  1125. data/closure-library/closure/goog/testing/editor/testhelper_test.html +0 -176
  1126. data/closure-library/closure/goog/testing/events/eventobserver.js +0 -85
  1127. data/closure-library/closure/goog/testing/events/eventobserver_test.html +0 -70
  1128. data/closure-library/closure/goog/testing/events/events.js +0 -540
  1129. data/closure-library/closure/goog/testing/events/events_test.html +0 -434
  1130. data/closure-library/closure/goog/testing/events/matchers.js +0 -41
  1131. data/closure-library/closure/goog/testing/events/matchers_test.html +0 -40
  1132. data/closure-library/closure/goog/testing/expectedfailures.js +0 -236
  1133. data/closure-library/closure/goog/testing/expectedfailures_test.html +0 -122
  1134. data/closure-library/closure/goog/testing/fs/blob.js +0 -74
  1135. data/closure-library/closure/goog/testing/fs/blob_test.html +0 -53
  1136. data/closure-library/closure/goog/testing/fs/directoryentry_test.html +0 -185
  1137. data/closure-library/closure/goog/testing/fs/entry.js +0 -511
  1138. data/closure-library/closure/goog/testing/fs/entry_test.html +0 -153
  1139. data/closure-library/closure/goog/testing/fs/file.js +0 -51
  1140. data/closure-library/closure/goog/testing/fs/fileentry_test.html +0 -54
  1141. data/closure-library/closure/goog/testing/fs/filesystem.js +0 -64
  1142. data/closure-library/closure/goog/testing/fs/filewriter.js +0 -314
  1143. data/closure-library/closure/goog/testing/fs/filewriter_test.html +0 -248
  1144. data/closure-library/closure/goog/testing/fs/fs.js +0 -146
  1145. data/closure-library/closure/goog/testing/fs/fs_test.html +0 -54
  1146. data/closure-library/closure/goog/testing/fs/integration_test.html +0 -219
  1147. data/closure-library/closure/goog/testing/functionmock.js +0 -157
  1148. data/closure-library/closure/goog/testing/functionmock_test.html +0 -357
  1149. data/closure-library/closure/goog/testing/graphics.js +0 -64
  1150. data/closure-library/closure/goog/testing/jsunit.js +0 -144
  1151. data/closure-library/closure/goog/testing/loosemock.js +0 -240
  1152. data/closure-library/closure/goog/testing/loosemock_test.html +0 -343
  1153. data/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +0 -77
  1154. data/closure-library/closure/goog/testing/messaging/mockmessageevent.js +0 -100
  1155. data/closure-library/closure/goog/testing/messaging/mockmessageport.js +0 -85
  1156. data/closure-library/closure/goog/testing/messaging/mockportnetwork.js +0 -64
  1157. data/closure-library/closure/goog/testing/mock.js +0 -556
  1158. data/closure-library/closure/goog/testing/mock_test.html +0 -208
  1159. data/closure-library/closure/goog/testing/mockclassfactory.js +0 -580
  1160. data/closure-library/closure/goog/testing/mockclassfactory_test.html +0 -241
  1161. data/closure-library/closure/goog/testing/mockclock.js +0 -395
  1162. data/closure-library/closure/goog/testing/mockclock_test.html +0 -413
  1163. data/closure-library/closure/goog/testing/mockcontrol.js +0 -210
  1164. data/closure-library/closure/goog/testing/mockcontrol_test.html +0 -127
  1165. data/closure-library/closure/goog/testing/mockinterface.js +0 -45
  1166. data/closure-library/closure/goog/testing/mockmatchers.js +0 -395
  1167. data/closure-library/closure/goog/testing/mockmatchers_test.html +0 -388
  1168. data/closure-library/closure/goog/testing/mockrandom.js +0 -128
  1169. data/closure-library/closure/goog/testing/mockrandom_test.html +0 -56
  1170. data/closure-library/closure/goog/testing/mockrange.js +0 -65
  1171. data/closure-library/closure/goog/testing/mockrange_test.html +0 -41
  1172. data/closure-library/closure/goog/testing/mockuseragent.js +0 -143
  1173. data/closure-library/closure/goog/testing/mockuseragent_test.html +0 -59
  1174. data/closure-library/closure/goog/testing/multitestrunner.js +0 -1442
  1175. data/closure-library/closure/goog/testing/net/xhrio.js +0 -595
  1176. data/closure-library/closure/goog/testing/net/xhrio_test.html +0 -321
  1177. data/closure-library/closure/goog/testing/objectpropertystring.js +0 -67
  1178. data/closure-library/closure/goog/testing/performancetable.css +0 -46
  1179. data/closure-library/closure/goog/testing/performancetable.js +0 -162
  1180. data/closure-library/closure/goog/testing/performancetimer.js +0 -166
  1181. data/closure-library/closure/goog/testing/performancetimer_test.html +0 -107
  1182. data/closure-library/closure/goog/testing/propertyreplacer.js +0 -243
  1183. data/closure-library/closure/goog/testing/propertyreplacer_test.html +0 -368
  1184. data/closure-library/closure/goog/testing/pseudorandom.js +0 -162
  1185. data/closure-library/closure/goog/testing/pseudorandom_test.html +0 -98
  1186. data/closure-library/closure/goog/testing/recordfunction.js +0 -194
  1187. data/closure-library/closure/goog/testing/recordfunction_test.html +0 -147
  1188. data/closure-library/closure/goog/testing/singleton.js +0 -82
  1189. data/closure-library/closure/goog/testing/singleton_test.html +0 -39
  1190. data/closure-library/closure/goog/testing/stacktrace.js +0 -470
  1191. data/closure-library/closure/goog/testing/stacktrace_test.html +0 -229
  1192. data/closure-library/closure/goog/testing/strictmock.js +0 -124
  1193. data/closure-library/closure/goog/testing/strictmock_test.html +0 -368
  1194. data/closure-library/closure/goog/testing/style/layoutasserts.js +0 -368
  1195. data/closure-library/closure/goog/testing/style/layoutasserts_test.html +0 -269
  1196. data/closure-library/closure/goog/testing/testcase.js +0 -1053
  1197. data/closure-library/closure/goog/testing/testqueue.js +0 -66
  1198. data/closure-library/closure/goog/testing/testrunner.js +0 -391
  1199. data/closure-library/closure/goog/testing/ui/rendererasserts.js +0 -50
  1200. data/closure-library/closure/goog/testing/ui/rendererasserts_test.html +0 -51
  1201. data/closure-library/closure/goog/testing/ui/rendererharness.js +0 -175
  1202. data/closure-library/closure/goog/testing/ui/style.js +0 -137
  1203. data/closure-library/closure/goog/testing/ui/style_reference.html +0 -27
  1204. data/closure-library/closure/goog/testing/ui/style_test.html +0 -130
  1205. data/closure-library/closure/goog/timer/timer.js +0 -285
  1206. data/closure-library/closure/goog/timer/timer_test.html +0 -118
  1207. data/closure-library/closure/goog/tweak/entries.js +0 -990
  1208. data/closure-library/closure/goog/tweak/entries_test.html +0 -94
  1209. data/closure-library/closure/goog/tweak/registry.js +0 -310
  1210. data/closure-library/closure/goog/tweak/registry_test.html +0 -144
  1211. data/closure-library/closure/goog/tweak/testhelpers.js +0 -111
  1212. data/closure-library/closure/goog/tweak/tweak.js +0 -318
  1213. data/closure-library/closure/goog/tweak/tweakui.js +0 -817
  1214. data/closure-library/closure/goog/tweak/tweakui_test.html +0 -280
  1215. data/closure-library/closure/goog/ui/abstractspellchecker.js +0 -1069
  1216. data/closure-library/closure/goog/ui/activitymonitor.js +0 -286
  1217. data/closure-library/closure/goog/ui/activitymonitor_test.html +0 -44
  1218. data/closure-library/closure/goog/ui/advancedtooltip.js +0 -368
  1219. data/closure-library/closure/goog/ui/advancedtooltip_test.html +0 -274
  1220. data/closure-library/closure/goog/ui/animatedzippy.js +0 -190
  1221. data/closure-library/closure/goog/ui/attachablemenu.js +0 -464
  1222. data/closure-library/closure/goog/ui/autocomplete/arraymatcher.js +0 -156
  1223. data/closure-library/closure/goog/ui/autocomplete/arraymatcher_test.html +0 -130
  1224. data/closure-library/closure/goog/ui/autocomplete/autocomplete.js +0 -627
  1225. data/closure-library/closure/goog/ui/autocomplete/autocomplete_test.html +0 -537
  1226. data/closure-library/closure/goog/ui/autocomplete/basic.js +0 -53
  1227. data/closure-library/closure/goog/ui/autocomplete/basic_test.html +0 -204
  1228. data/closure-library/closure/goog/ui/autocomplete/inputhandler.js +0 -1209
  1229. data/closure-library/closure/goog/ui/autocomplete/inputhandler_test.html +0 -555
  1230. data/closure-library/closure/goog/ui/autocomplete/remote.js +0 -117
  1231. data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher.js +0 -273
  1232. data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher_test.html +0 -73
  1233. data/closure-library/closure/goog/ui/autocomplete/renderer.js +0 -852
  1234. data/closure-library/closure/goog/ui/autocomplete/renderer_test.html +0 -386
  1235. data/closure-library/closure/goog/ui/autocomplete/richinputhandler.js +0 -59
  1236. data/closure-library/closure/goog/ui/autocomplete/richremote.js +0 -108
  1237. data/closure-library/closure/goog/ui/autocomplete/richremotearraymatcher.js +0 -126
  1238. data/closure-library/closure/goog/ui/basicmenu.js +0 -930
  1239. data/closure-library/closure/goog/ui/bidiinput.js +0 -164
  1240. data/closure-library/closure/goog/ui/bubble.js +0 -475
  1241. data/closure-library/closure/goog/ui/button.js +0 -208
  1242. data/closure-library/closure/goog/ui/button_test.html +0 -257
  1243. data/closure-library/closure/goog/ui/buttonrenderer.js +0 -205
  1244. data/closure-library/closure/goog/ui/buttonrenderer_test.html +0 -190
  1245. data/closure-library/closure/goog/ui/buttonside.js +0 -40
  1246. data/closure-library/closure/goog/ui/cccbutton.js +0 -281
  1247. data/closure-library/closure/goog/ui/charcounter.js +0 -200
  1248. data/closure-library/closure/goog/ui/charpicker.js +0 -807
  1249. data/closure-library/closure/goog/ui/checkbox.js +0 -303
  1250. data/closure-library/closure/goog/ui/checkbox_test.html +0 -224
  1251. data/closure-library/closure/goog/ui/checkboxmenuitem.js +0 -53
  1252. data/closure-library/closure/goog/ui/colorbutton.js +0 -58
  1253. data/closure-library/closure/goog/ui/colorbutton_test.html +0 -70
  1254. data/closure-library/closure/goog/ui/colorbuttonrenderer.js +0 -72
  1255. data/closure-library/closure/goog/ui/colormenubutton.js +0 -213
  1256. data/closure-library/closure/goog/ui/colormenubuttonrenderer.js +0 -144
  1257. data/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +0 -88
  1258. data/closure-library/closure/goog/ui/colorpalette.js +0 -162
  1259. data/closure-library/closure/goog/ui/colorpalette_test.html +0 -169
  1260. data/closure-library/closure/goog/ui/colorpicker.js +0 -344
  1261. data/closure-library/closure/goog/ui/colorsplitbehavior.js +0 -61
  1262. data/closure-library/closure/goog/ui/combobox.js +0 -894
  1263. data/closure-library/closure/goog/ui/combobox_test.html +0 -208
  1264. data/closure-library/closure/goog/ui/component.js +0 -1187
  1265. data/closure-library/closure/goog/ui/component_test.html +0 -723
  1266. data/closure-library/closure/goog/ui/container.js +0 -1296
  1267. data/closure-library/closure/goog/ui/container_test.html +0 -450
  1268. data/closure-library/closure/goog/ui/containerrenderer.js +0 -370
  1269. data/closure-library/closure/goog/ui/containerrenderer_test.html +0 -227
  1270. data/closure-library/closure/goog/ui/containerscroller.js +0 -221
  1271. data/closure-library/closure/goog/ui/containerscroller_test.html +0 -213
  1272. data/closure-library/closure/goog/ui/control.js +0 -1348
  1273. data/closure-library/closure/goog/ui/control_test.html +0 -2128
  1274. data/closure-library/closure/goog/ui/controlcontent.js +0 -28
  1275. data/closure-library/closure/goog/ui/controlrenderer.js +0 -808
  1276. data/closure-library/closure/goog/ui/controlrenderer_test.html +0 -840
  1277. data/closure-library/closure/goog/ui/cookieeditor.js +0 -182
  1278. data/closure-library/closure/goog/ui/cookieeditor_test.html +0 -102
  1279. data/closure-library/closure/goog/ui/css3buttonrenderer.js +0 -147
  1280. data/closure-library/closure/goog/ui/css3menubuttonrenderer.js +0 -144
  1281. data/closure-library/closure/goog/ui/cssnames.js +0 -28
  1282. data/closure-library/closure/goog/ui/custombutton.js +0 -58
  1283. data/closure-library/closure/goog/ui/custombuttonrenderer.js +0 -254
  1284. data/closure-library/closure/goog/ui/customcolorpalette.js +0 -137
  1285. data/closure-library/closure/goog/ui/customcolorpalette_test.html +0 -60
  1286. data/closure-library/closure/goog/ui/datepicker.js +0 -1339
  1287. data/closure-library/closure/goog/ui/datepicker_test.html +0 -190
  1288. data/closure-library/closure/goog/ui/decorate.js +0 -37
  1289. data/closure-library/closure/goog/ui/decorate_test.html +0 -113
  1290. data/closure-library/closure/goog/ui/deprecatedbutton.js +0 -381
  1291. data/closure-library/closure/goog/ui/dialog.js +0 -1776
  1292. data/closure-library/closure/goog/ui/dialog_test.html +0 -493
  1293. data/closure-library/closure/goog/ui/dimensionpicker.js +0 -289
  1294. data/closure-library/closure/goog/ui/dimensionpicker_test.html +0 -128
  1295. data/closure-library/closure/goog/ui/dimensionpickerrenderer.js +0 -387
  1296. data/closure-library/closure/goog/ui/dragdropdetector.js +0 -642
  1297. data/closure-library/closure/goog/ui/drilldownrow.js +0 -494
  1298. data/closure-library/closure/goog/ui/editor/abstractdialog.js +0 -443
  1299. data/closure-library/closure/goog/ui/editor/abstractdialog_test.html +0 -467
  1300. data/closure-library/closure/goog/ui/editor/bubble.js +0 -520
  1301. data/closure-library/closure/goog/ui/editor/bubble_test.html +0 -264
  1302. data/closure-library/closure/goog/ui/editor/defaulttoolbar.js +0 -1062
  1303. data/closure-library/closure/goog/ui/editor/linkdialog.js +0 -833
  1304. data/closure-library/closure/goog/ui/editor/linkdialog_test.html +0 -449
  1305. data/closure-library/closure/goog/ui/editor/messages.js +0 -115
  1306. data/closure-library/closure/goog/ui/editor/tabpane.js +0 -183
  1307. data/closure-library/closure/goog/ui/editor/toolbarcontroller.js +0 -293
  1308. data/closure-library/closure/goog/ui/editor/toolbarfactory.js +0 -437
  1309. data/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +0 -73
  1310. data/closure-library/closure/goog/ui/emoji/emoji.js +0 -72
  1311. data/closure-library/closure/goog/ui/emoji/emojipalette.js +0 -298
  1312. data/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +0 -206
  1313. data/closure-library/closure/goog/ui/emoji/emojipicker.js +0 -797
  1314. data/closure-library/closure/goog/ui/emoji/emojipicker_test.html +0 -840
  1315. data/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +0 -256
  1316. data/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +0 -256
  1317. data/closure-library/closure/goog/ui/emoji/popupemojipicker.js +0 -410
  1318. data/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +0 -80
  1319. data/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +0 -97
  1320. data/closure-library/closure/goog/ui/emoji/spriteinfo.js +0 -212
  1321. data/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +0 -51
  1322. data/closure-library/closure/goog/ui/filteredmenu.js +0 -562
  1323. data/closure-library/closure/goog/ui/filteredmenu_test.html +0 -299
  1324. data/closure-library/closure/goog/ui/filterobservingmenuitem.js +0 -97
  1325. data/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +0 -60
  1326. data/closure-library/closure/goog/ui/flatbuttonrenderer.js +0 -138
  1327. data/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +0 -199
  1328. data/closure-library/closure/goog/ui/formpost.js +0 -109
  1329. data/closure-library/closure/goog/ui/formpost_test.html +0 -109
  1330. data/closure-library/closure/goog/ui/gauge.js +0 -999
  1331. data/closure-library/closure/goog/ui/gaugetheme.js +0 -169
  1332. data/closure-library/closure/goog/ui/hovercard.js +0 -447
  1333. data/closure-library/closure/goog/ui/hovercard_test.html +0 -343
  1334. data/closure-library/closure/goog/ui/hsvapalette.js +0 -311
  1335. data/closure-library/closure/goog/ui/hsvapalette_test.html +0 -152
  1336. data/closure-library/closure/goog/ui/hsvpalette.js +0 -470
  1337. data/closure-library/closure/goog/ui/hsvpalette_test.html +0 -202
  1338. data/closure-library/closure/goog/ui/idgenerator.js +0 -57
  1339. data/closure-library/closure/goog/ui/idletimer.js +0 -299
  1340. data/closure-library/closure/goog/ui/idletimer_test.html +0 -100
  1341. data/closure-library/closure/goog/ui/iframemask.js +0 -256
  1342. data/closure-library/closure/goog/ui/iframemask_test.html +0 -230
  1343. data/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +0 -204
  1344. data/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +0 -202
  1345. data/closure-library/closure/goog/ui/imagelessroundedcorner.js +0 -971
  1346. data/closure-library/closure/goog/ui/inputdatepicker.js +0 -306
  1347. data/closure-library/closure/goog/ui/inputdatepicker_test.html +0 -109
  1348. data/closure-library/closure/goog/ui/itemevent.js +0 -50
  1349. data/closure-library/closure/goog/ui/keyboardshortcuthandler.js +0 -981
  1350. data/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +0 -671
  1351. data/closure-library/closure/goog/ui/labelinput.js +0 -439
  1352. data/closure-library/closure/goog/ui/linkbuttonrenderer.js +0 -67
  1353. data/closure-library/closure/goog/ui/media/flashobject.js +0 -629
  1354. data/closure-library/closure/goog/ui/media/flashobject_test.html +0 -236
  1355. data/closure-library/closure/goog/ui/media/flickr.js +0 -309
  1356. data/closure-library/closure/goog/ui/media/flickr_test.html +0 -90
  1357. data/closure-library/closure/goog/ui/media/media.js +0 -284
  1358. data/closure-library/closure/goog/ui/media/media_test.html +0 -161
  1359. data/closure-library/closure/goog/ui/media/mediamodel.js +0 -840
  1360. data/closure-library/closure/goog/ui/media/mp3.js +0 -225
  1361. data/closure-library/closure/goog/ui/media/mp3_test.html +0 -78
  1362. data/closure-library/closure/goog/ui/media/photo.js +0 -139
  1363. data/closure-library/closure/goog/ui/media/photo_test.html +0 -62
  1364. data/closure-library/closure/goog/ui/media/picasa.js +0 -317
  1365. data/closure-library/closure/goog/ui/media/picasa_test.html +0 -131
  1366. data/closure-library/closure/goog/ui/media/vimeo.js +0 -264
  1367. data/closure-library/closure/goog/ui/media/vimeo_test.html +0 -79
  1368. data/closure-library/closure/goog/ui/media/youtube.js +0 -328
  1369. data/closure-library/closure/goog/ui/media/youtube_test.html +0 -185
  1370. data/closure-library/closure/goog/ui/menu.js +0 -435
  1371. data/closure-library/closure/goog/ui/menu_test.html +0 -129
  1372. data/closure-library/closure/goog/ui/menubase.js +0 -191
  1373. data/closure-library/closure/goog/ui/menubutton.js +0 -815
  1374. data/closure-library/closure/goog/ui/menubutton_test.html +0 -440
  1375. data/closure-library/closure/goog/ui/menubutton_test_frame.html +0 -41
  1376. data/closure-library/closure/goog/ui/menubuttonrenderer.js +0 -226
  1377. data/closure-library/closure/goog/ui/menubuttonrenderer_test.html +0 -161
  1378. data/closure-library/closure/goog/ui/menuheader.js +0 -62
  1379. data/closure-library/closure/goog/ui/menuheaderrenderer.js +0 -55
  1380. data/closure-library/closure/goog/ui/menuitem.js +0 -154
  1381. data/closure-library/closure/goog/ui/menuitem_test.html +0 -506
  1382. data/closure-library/closure/goog/ui/menuitemrenderer.js +0 -353
  1383. data/closure-library/closure/goog/ui/menuitemrenderer_test.html +0 -190
  1384. data/closure-library/closure/goog/ui/menurenderer.js +0 -118
  1385. data/closure-library/closure/goog/ui/menuseparator.js +0 -51
  1386. data/closure-library/closure/goog/ui/menuseparatorrenderer.js +0 -102
  1387. data/closure-library/closure/goog/ui/mockactivitymonitor.js +0 -54
  1388. data/closure-library/closure/goog/ui/nativebuttonrenderer.js +0 -205
  1389. data/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +0 -213
  1390. data/closure-library/closure/goog/ui/offlineinstalldialog.js +0 -1086
  1391. data/closure-library/closure/goog/ui/offlinestatuscard.js +0 -580
  1392. data/closure-library/closure/goog/ui/offlinestatuscomponent.js +0 -545
  1393. data/closure-library/closure/goog/ui/option.js +0 -67
  1394. data/closure-library/closure/goog/ui/palette.js +0 -528
  1395. data/closure-library/closure/goog/ui/paletterenderer.js +0 -318
  1396. data/closure-library/closure/goog/ui/plaintextspellchecker.js +0 -668
  1397. data/closure-library/closure/goog/ui/plaintextspellchecker_test.html +0 -240
  1398. data/closure-library/closure/goog/ui/popup.js +0 -410
  1399. data/closure-library/closure/goog/ui/popup_test.html +0 -137
  1400. data/closure-library/closure/goog/ui/popupbase.js +0 -721
  1401. data/closure-library/closure/goog/ui/popupbase_test.html +0 -186
  1402. data/closure-library/closure/goog/ui/popupcolorpicker.js +0 -441
  1403. data/closure-library/closure/goog/ui/popupcolorpicker_test.html +0 -71
  1404. data/closure-library/closure/goog/ui/popupdatepicker.js +0 -273
  1405. data/closure-library/closure/goog/ui/popupmenu.js +0 -539
  1406. data/closure-library/closure/goog/ui/popupmenu_test.html +0 -197
  1407. data/closure-library/closure/goog/ui/progressbar.js +0 -390
  1408. data/closure-library/closure/goog/ui/prompt.js +0 -307
  1409. data/closure-library/closure/goog/ui/prompt_test.html +0 -65
  1410. data/closure-library/closure/goog/ui/rangemodel.js +0 -301
  1411. data/closure-library/closure/goog/ui/rangemodel_test.html +0 -270
  1412. data/closure-library/closure/goog/ui/ratings.js +0 -441
  1413. data/closure-library/closure/goog/ui/registry.js +0 -166
  1414. data/closure-library/closure/goog/ui/registry_test.html +0 -236
  1415. data/closure-library/closure/goog/ui/richtextspellchecker.js +0 -600
  1416. data/closure-library/closure/goog/ui/richtextspellchecker_test.html +0 -224
  1417. data/closure-library/closure/goog/ui/roundedcorners.js +0 -694
  1418. data/closure-library/closure/goog/ui/roundedpanel.js +0 -609
  1419. data/closure-library/closure/goog/ui/roundedpanel_test.html +0 -57
  1420. data/closure-library/closure/goog/ui/roundedtabrenderer.js +0 -196
  1421. data/closure-library/closure/goog/ui/scrollfloater.js +0 -394
  1422. data/closure-library/closure/goog/ui/scrollfloater_test.html +0 -46
  1423. data/closure-library/closure/goog/ui/select.js +0 -397
  1424. data/closure-library/closure/goog/ui/select_test.html +0 -152
  1425. data/closure-library/closure/goog/ui/selectionmenubutton.js +0 -277
  1426. data/closure-library/closure/goog/ui/selectionmenubutton_test.html +0 -237
  1427. data/closure-library/closure/goog/ui/selectionmodel.js +0 -291
  1428. data/closure-library/closure/goog/ui/separator.js +0 -74
  1429. data/closure-library/closure/goog/ui/serverchart.js +0 -1791
  1430. data/closure-library/closure/goog/ui/serverchart_test.html +0 -598
  1431. data/closure-library/closure/goog/ui/slider.js +0 -125
  1432. data/closure-library/closure/goog/ui/sliderbase.js +0 -1087
  1433. data/closure-library/closure/goog/ui/sliderbase_test.html +0 -198
  1434. data/closure-library/closure/goog/ui/splitbehavior.js +0 -348
  1435. data/closure-library/closure/goog/ui/splitbehavior_test.html +0 -161
  1436. data/closure-library/closure/goog/ui/splitpane.js +0 -844
  1437. data/closure-library/closure/goog/ui/splitpane_test.html +0 -143
  1438. data/closure-library/closure/goog/ui/style/app/buttonrenderer.js +0 -204
  1439. data/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +0 -155
  1440. data/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +0 -227
  1441. data/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +0 -167
  1442. data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +0 -88
  1443. data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +0 -76
  1444. data/closure-library/closure/goog/ui/submenu.js +0 -660
  1445. data/closure-library/closure/goog/ui/submenu_test.html +0 -446
  1446. data/closure-library/closure/goog/ui/submenurenderer.js +0 -188
  1447. data/closure-library/closure/goog/ui/tab.js +0 -102
  1448. data/closure-library/closure/goog/ui/tab_test.html +0 -61
  1449. data/closure-library/closure/goog/ui/tabbar.js +0 -393
  1450. data/closure-library/closure/goog/ui/tabbar_test.html +0 -611
  1451. data/closure-library/closure/goog/ui/tabbarrenderer.js +0 -173
  1452. data/closure-library/closure/goog/ui/tabbarrenderer_test.html +0 -137
  1453. data/closure-library/closure/goog/ui/tablesorter.js +0 -304
  1454. data/closure-library/closure/goog/ui/tablesorter_test.html +0 -127
  1455. data/closure-library/closure/goog/ui/tabpane.js +0 -674
  1456. data/closure-library/closure/goog/ui/tabpane_test.html +0 -107
  1457. data/closure-library/closure/goog/ui/tabrenderer.js +0 -152
  1458. data/closure-library/closure/goog/ui/tabrenderer_test.html +0 -132
  1459. data/closure-library/closure/goog/ui/textarea.js +0 -573
  1460. data/closure-library/closure/goog/ui/textarea_test.html +0 -305
  1461. data/closure-library/closure/goog/ui/textarearenderer.js +0 -167
  1462. data/closure-library/closure/goog/ui/togglebutton.js +0 -58
  1463. data/closure-library/closure/goog/ui/toolbar.js +0 -45
  1464. data/closure-library/closure/goog/ui/toolbarbutton.js +0 -54
  1465. data/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +0 -55
  1466. data/closure-library/closure/goog/ui/toolbarcolormenubutton.js +0 -57
  1467. data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +0 -95
  1468. data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +0 -66
  1469. data/closure-library/closure/goog/ui/toolbarmenubutton.js +0 -56
  1470. data/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +0 -55
  1471. data/closure-library/closure/goog/ui/toolbarrenderer.js +0 -95
  1472. data/closure-library/closure/goog/ui/toolbarselect.js +0 -55
  1473. data/closure-library/closure/goog/ui/toolbarseparator.js +0 -51
  1474. data/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +0 -87
  1475. data/closure-library/closure/goog/ui/toolbartogglebutton.js +0 -53
  1476. data/closure-library/closure/goog/ui/tooltip.js +0 -975
  1477. data/closure-library/closure/goog/ui/tooltip_test.html +0 -351
  1478. data/closure-library/closure/goog/ui/tree/basenode.js +0 -1457
  1479. data/closure-library/closure/goog/ui/tree/basenode_test.html +0 -218
  1480. data/closure-library/closure/goog/ui/tree/treecontrol.js +0 -656
  1481. data/closure-library/closure/goog/ui/tree/treecontrol_test.html +0 -113
  1482. data/closure-library/closure/goog/ui/tree/treenode.js +0 -102
  1483. data/closure-library/closure/goog/ui/tree/typeahead.js +0 -332
  1484. data/closure-library/closure/goog/ui/tree/typeahead_test.html +0 -133
  1485. data/closure-library/closure/goog/ui/tristatemenuitem.js +0 -185
  1486. data/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +0 -86
  1487. data/closure-library/closure/goog/ui/twothumbslider.js +0 -134
  1488. data/closure-library/closure/goog/ui/zippy.js +0 -277
  1489. data/closure-library/closure/goog/ui/zippy_test.html +0 -223
  1490. data/closure-library/closure/goog/uri/uri.js +0 -1595
  1491. data/closure-library/closure/goog/uri/uri_test.html +0 -837
  1492. data/closure-library/closure/goog/uri/utils.js +0 -972
  1493. data/closure-library/closure/goog/uri/utils_test.html +0 -521
  1494. data/closure-library/closure/goog/useragent/adobereader.js +0 -90
  1495. data/closure-library/closure/goog/useragent/adobereader_test.html +0 -34
  1496. data/closure-library/closure/goog/useragent/flash.js +0 -113
  1497. data/closure-library/closure/goog/useragent/flash_test.html +0 -34
  1498. data/closure-library/closure/goog/useragent/iphoto.js +0 -86
  1499. data/closure-library/closure/goog/useragent/jscript.js +0 -94
  1500. data/closure-library/closure/goog/useragent/jscript_test.html +0 -65
  1501. data/closure-library/closure/goog/useragent/picasa.js +0 -111
  1502. data/closure-library/closure/goog/useragent/platform.js +0 -70
  1503. data/closure-library/closure/goog/useragent/platform_test.html +0 -108
  1504. data/closure-library/closure/goog/useragent/product.js +0 -253
  1505. data/closure-library/closure/goog/useragent/product_isversion.js +0 -99
  1506. data/closure-library/closure/goog/useragent/product_test.html +0 -322
  1507. data/closure-library/closure/goog/useragent/useragent.js +0 -464
  1508. data/closure-library/closure/goog/useragent/useragent_test.html +0 -290
  1509. data/closure-library/closure/goog/window/window.js +0 -206
  1510. data/closure-library/closure/goog/window/window_test.html +0 -185
  1511. data/closure-library/third_party/closure/goog/base.js +0 -2
  1512. data/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +0 -611
  1513. data/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +0 -605
  1514. data/closure-library/third_party/closure/goog/deps.js +0 -26
  1515. data/closure-library/third_party/closure/goog/dojo/dom/query.js +0 -1537
  1516. data/closure-library/third_party/closure/goog/dojo/dom/query_test.html +0 -63
  1517. data/closure-library/third_party/closure/goog/dojo/dom/query_test.js +0 -160
  1518. data/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +0 -751
  1519. data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +0 -712
  1520. data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +0 -61
  1521. data/closure-library/third_party/closure/goog/mochikit/async/deferred.js +0 -530
  1522. data/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +0 -627
  1523. data/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +0 -199
  1524. data/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +0 -426
  1525. data/closure-library/third_party/closure/goog/osapi/osapi.js +0 -91
  1526. data/closure-library/third_party/closure/goog/silverlight/AppManifest.xml +0 -6
  1527. data/closure-library/third_party/closure/goog/silverlight/AssemblyInfo.cs +0 -35
  1528. data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml +0 -9
  1529. data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml.cs +0 -74
  1530. data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml +0 -8
  1531. data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml.cs +0 -75
  1532. data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj +0 -108
  1533. data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj.user +0 -29
  1534. data/closure-library/third_party/closure/goog/silverlight/clipboardbutton.js +0 -279
  1535. data/closure-library/third_party/closure/goog/silverlight/silverlight.js +0 -758
  1536. data/closure-library/third_party/closure/goog/silverlight/supporteduseragent.js +0 -138
  1537. data/closure-library/third_party/closure/goog/silverlight/xap_files +0 -0
  1538. data/closure.gemspec +0 -19
  1539. data/config.ru +0 -40
  1540. data/java_src/ClosureScript.java +0 -89
  1541. data/java_src/make.rb +0 -19
  1542. data/lib/closure/sass.rb +0 -56
  1543. data/lib/closure.jar +0 -0
  1544. data/scripts/demos/compiler.build +0 -1
  1545. data/scripts/demos/compiler.debug +0 -24
  1546. data/scripts/demos/compiler.js.erb +0 -22
  1547. data/scripts/demos/compiler.map +0 -114
  1548. data/scripts/demos/deps.js.erb +0 -1
  1549. data/scripts/demos/googly.erb +0 -19
  1550. data/scripts/demos/googly.js +0 -24
  1551. data/scripts/demos/helloworld.erb +0 -24
  1552. data/scripts/demos/helloworld.js +0 -58
  1553. data/scripts/demos/helloworld.soy +0 -45
  1554. data/scripts/demos/index.erb +0 -29
  1555. data/scripts/externs/jquery.externs +0 -4
  1556. data/scripts/fixtures/_partial.haml +0 -2
  1557. data/scripts/fixtures/erb.html.erb +0 -8
  1558. data/scripts/fixtures/haml.haml +0 -6
  1559. data/scripts/fixtures/html.html +0 -9
  1560. data/scripts/fixtures/route_js.js.erb +0 -1
  1561. data/test/beanshell_test.rb +0 -22
  1562. data/test/server_test.rb +0 -67
  1563. data/test/sources_test.rb +0 -41
  1564. data/test/test_helper.rb +0 -12
  1565. /data/{scripts/externs → externs}/jquery-ui.externs +0 -0
  1566. /data/scripts/{demos/jquery.js → jquery/jquery_1.4.4.js} +0 -0
@@ -1,2594 +0,0 @@
1
- // Copyright 2006 The Closure Library Authors. All Rights Reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS-IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- // All Rights Reserved.
15
-
16
- /**
17
- * @fileoverview Class to encapsulate an editable field. Always uses an
18
- * iframe to contain the editable area, never inherits the style of the
19
- * surrounding page, and is always a fixed height.
20
- *
21
- * @see ../demos/editor/editor.html
22
- * @see ../demos/editor/field_basic.html
23
- */
24
-
25
- goog.provide('goog.editor.Field');
26
- goog.provide('goog.editor.Field.EventType');
27
-
28
- goog.require('goog.array');
29
- goog.require('goog.async.Delay');
30
- goog.require('goog.debug.Logger');
31
- goog.require('goog.dom');
32
- goog.require('goog.dom.Range');
33
- goog.require('goog.dom.TagName');
34
- goog.require('goog.dom.classes');
35
- goog.require('goog.editor.BrowserFeature');
36
- goog.require('goog.editor.Command');
37
- goog.require('goog.editor.Plugin');
38
- goog.require('goog.editor.icontent');
39
- goog.require('goog.editor.icontent.FieldFormatInfo');
40
- goog.require('goog.editor.icontent.FieldStyleInfo');
41
- goog.require('goog.editor.node');
42
- goog.require('goog.editor.range');
43
- goog.require('goog.events');
44
- goog.require('goog.events.BrowserEvent');
45
- goog.require('goog.events.EventHandler');
46
- goog.require('goog.events.EventType');
47
- goog.require('goog.events.KeyCodes');
48
- goog.require('goog.functions');
49
- goog.require('goog.string');
50
- goog.require('goog.string.Unicode');
51
- goog.require('goog.style');
52
- goog.require('goog.userAgent');
53
-
54
-
55
-
56
- /**
57
- * This class encapsulates an editable field.
58
- *
59
- * event: load Fires when the field is loaded
60
- * event: unload Fires when the field is unloaded (made not editable)
61
- *
62
- * event: beforechange Fires before the content of the field might change
63
- *
64
- * event: delayedchange Fires a short time after field has changed. If multiple
65
- * change events happen really close to each other only
66
- * the last one will trigger the delayedchange event.
67
- *
68
- * event: beforefocus Fires before the field becomes active
69
- * event: focus Fires when the field becomes active. Fires after the blur event
70
- * event: blur Fires when the field becomes inactive
71
- *
72
- * TODO: figure out if blur or beforefocus fires first in IE and make FF match
73
- *
74
- * @param {string} id An identifer for the field. This is used to find the
75
- * field and the element associated with this field.
76
- * @param {Document=} opt_doc The document that the element with the given
77
- * id can be found in. If not provided, the default document is used.
78
- * @constructor
79
- * @extends {goog.events.EventTarget}
80
- */
81
- goog.editor.Field = function(id, opt_doc) {
82
- goog.events.EventTarget.call(this);
83
-
84
- /**
85
- * The id for this editable field, which must match the id of the element
86
- * associated with this field.
87
- * @type {string}
88
- */
89
- this.id = id;
90
-
91
- /**
92
- * The hash code for this field. Should be equal to the id.
93
- * @type {string}
94
- * @private
95
- */
96
- this.hashCode_ = id;
97
-
98
- /**
99
- * Dom helper for the editable node.
100
- * @type {goog.dom.DomHelper}
101
- * @protected
102
- */
103
- this.editableDomHelper = null;
104
-
105
- /**
106
- * Map of class id to registered plugin.
107
- * @type {Object}
108
- * @private
109
- */
110
- this.plugins_ = {};
111
-
112
-
113
- /**
114
- * Plugins registered on this field, indexed by the goog.editor.Plugin.Op
115
- * that they support.
116
- * @type {Object.<Array>}
117
- * @private
118
- */
119
- this.indexedPlugins_ = {};
120
-
121
- for (var op in goog.editor.Plugin.OPCODE) {
122
- this.indexedPlugins_[op] = [];
123
- }
124
-
125
-
126
- /**
127
- * Additional styles to install for the editable field.
128
- * @type {string}
129
- * @protected
130
- */
131
- this.cssStyles = '';
132
-
133
- // Work around bug https://bugs.webkit.org/show_bug.cgi?id=19086 in affected
134
- // versions of Webkit by specifying 1px right margin on all immediate children
135
- // of the editable field. This works in most (but not all) cases.
136
- // Note. The fix uses a CSS rule which may be quite expensive, especially
137
- // in BLENDED mode. Currently this is the only known wokraround.
138
- // TODO(user): The bug was fixed in community Webkit but not included in
139
- // Safari yet. Verify that the next Safari release after 525.18 is
140
- // unaffected.
141
- if (goog.userAgent.WEBKIT && goog.userAgent.isVersion('525.13') &&
142
- goog.string.compareVersions(goog.userAgent.VERSION, '525.18') <= 0) {
143
- this.workaroundClassName_ = goog.getCssName('tr-webkit-workaround');
144
- this.cssStyles = '.' + this.workaroundClassName_ + '>*{padding-right:1}';
145
- }
146
-
147
- // The field will not listen to change events until it has finished loading
148
- this.stoppedEvents_ = {};
149
- this.stopEvent(goog.editor.Field.EventType.CHANGE);
150
- this.stopEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
151
- this.isModified_ = false;
152
- this.isEverModified_ = false;
153
- this.delayedChangeTimer_ = new goog.async.Delay(this.dispatchDelayedChange_,
154
- goog.editor.Field.DELAYED_CHANGE_FREQUENCY, this);
155
-
156
- this.debouncedEvents_ = {};
157
- for (var key in goog.editor.Field.EventType) {
158
- this.debouncedEvents_[goog.editor.Field.EventType[key]] = 0;
159
- }
160
-
161
- if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
162
- this.changeTimerGecko_ = new goog.async.Delay(this.handleChange,
163
- goog.editor.Field.CHANGE_FREQUENCY, this);
164
- }
165
-
166
- /**
167
- * @type {goog.events.EventHandler}
168
- * @protected
169
- */
170
- this.eventRegister = new goog.events.EventHandler(this);
171
-
172
- // Wrappers around this field, to be disposed when the field is disposed.
173
- this.wrappers_ = [];
174
-
175
- this.loadState_ = goog.editor.Field.LoadState_.UNEDITABLE;
176
-
177
- var doc = opt_doc || document;
178
- this.originalDomHelper = goog.dom.getDomHelper(doc);
179
- this.originalElement = this.originalDomHelper.getElement(this.id);
180
-
181
- // Default to the same window as the field is in.
182
- this.appWindow_ = this.originalDomHelper.getWindow();
183
- };
184
- goog.inherits(goog.editor.Field, goog.events.EventTarget);
185
-
186
-
187
- /**
188
- * The editable dom node.
189
- * @type {Element}
190
- * TODO(user): Make this private!
191
- */
192
- goog.editor.Field.prototype.field = null;
193
-
194
-
195
- /**
196
- * The original node that is being made editable, or null if it has
197
- * not yet been found.
198
- * @type {Element}
199
- * @protected
200
- */
201
- goog.editor.Field.prototype.originalElement = null;
202
-
203
-
204
- /**
205
- * Logging object.
206
- * @type {goog.debug.Logger}
207
- * @protected
208
- */
209
- goog.editor.Field.prototype.logger =
210
- goog.debug.Logger.getLogger('goog.editor.Field');
211
-
212
-
213
- /**
214
- * Event types that can be stopped/started.
215
- * @enum {string}
216
- */
217
- goog.editor.Field.EventType = {
218
- /**
219
- * Dispatched when the command state of the selection may have changed. This
220
- * event should be listened to for updating toolbar state.
221
- */
222
- COMMAND_VALUE_CHANGE: 'cvc',
223
- /**
224
- * Dispatched when the field is loaded and ready to use.
225
- */
226
- LOAD: 'load',
227
- /**
228
- * Dispatched when the field is fully unloaded and uneditable.
229
- */
230
- UNLOAD: 'unload',
231
- /**
232
- * Dispatched before the field contents are changed.
233
- */
234
- BEFORECHANGE: 'beforechange',
235
- /**
236
- * Dispatched when the field contents change, in FF only.
237
- * Used for internal resizing, please do not use.
238
- */
239
- CHANGE: 'change',
240
- /**
241
- * Dispatched on a slight delay after changes are made.
242
- * Use for autosave, or other times your app needs to know
243
- * that the field contents changed.
244
- */
245
- DELAYEDCHANGE: 'delayedchange',
246
- /**
247
- * Dispatched before focus in moved into the field.
248
- */
249
- BEFOREFOCUS: 'beforefocus',
250
- /**
251
- * Dispatched when focus is moved into the field.
252
- */
253
- FOCUS: 'focus',
254
- /**
255
- * Dispatched when the field is blurred.
256
- */
257
- BLUR: 'blur',
258
- /**
259
- * Dispach before tab is handled by the field. This is a legacy way
260
- * of controlling tab behavior. Use trog.plugins.AbstractTabHandler now.
261
- */
262
- BEFORETAB: 'beforetab',
263
- /**
264
- * Dispatched when the selection changes.
265
- * Use handleSelectionChange from plugin API instead of listening
266
- * directly to this event.
267
- */
268
- SELECTIONCHANGE: 'selectionchange'
269
- };
270
-
271
-
272
- /**
273
- * The load state of the field.
274
- * @enum {number}
275
- * @private
276
- */
277
- goog.editor.Field.LoadState_ = {
278
- UNEDITABLE: 0,
279
- LOADING: 1,
280
- EDITABLE: 2
281
- };
282
-
283
-
284
- /**
285
- * The amount of time that a debounce blocks an event.
286
- * TODO(nicksantos): As of 9/30/07, this is only used for blocking
287
- * a keyup event after a keydown. We might need to tweak this for other
288
- * types of events. Maybe have a per-event debounce time?
289
- * @type {number}
290
- * @private
291
- */
292
- goog.editor.Field.DEBOUNCE_TIME_MS_ = 500;
293
-
294
-
295
- /**
296
- * There is at most one "active" field at a time. By "active" field, we mean
297
- * a field that has focus and is being used.
298
- * @type {?string}
299
- * @private
300
- */
301
- goog.editor.Field.activeFieldId_ = null;
302
-
303
-
304
- /**
305
- * Whether this field is in "modal interaction" mode. This usually
306
- * means that it's being edited by a dialog.
307
- * @type {boolean}
308
- * @private
309
- */
310
- goog.editor.Field.prototype.inModalMode_ = false;
311
-
312
-
313
- /**
314
- * The window where dialogs and bubbles should be rendered.
315
- * @type {!Window}
316
- * @private
317
- */
318
- goog.editor.Field.prototype.appWindow_;
319
-
320
-
321
- /**
322
- * The dom helper for the node to be made editable.
323
- * @type {goog.dom.DomHelper}
324
- * @protected
325
- */
326
- goog.editor.Field.prototype.originalDomHelper;
327
-
328
-
329
- /**
330
- * Target node to be used when dispatching SELECTIONCHANGE asynchronously on
331
- * mouseup (to avoid IE quirk). Should be set just before starting the timer and
332
- * nulled right after consuming.
333
- * @type {Node}
334
- * @private
335
- */
336
- goog.editor.Field.prototype.selectionChangeTarget_;
337
-
338
-
339
- /**
340
- * Sets the active field id.
341
- * @param {?string} fieldId The active field id.
342
- */
343
- goog.editor.Field.setActiveFieldId = function(fieldId) {
344
- goog.editor.Field.activeFieldId_ = fieldId;
345
- };
346
-
347
-
348
- /**
349
- * @return {?string} The id of the active field.
350
- */
351
- goog.editor.Field.getActiveFieldId = function() {
352
- return goog.editor.Field.activeFieldId_;
353
- };
354
-
355
-
356
- /**
357
- * @return {boolean} Whether we're in modal interaction mode. When this
358
- * returns true, another plugin is interacting with the field contents
359
- * in a synchronous way, and expects you not to make changes to
360
- * the field's DOM structure or selection.
361
- */
362
- goog.editor.Field.prototype.inModalMode = function() {
363
- return this.inModalMode_;
364
- };
365
-
366
-
367
- /**
368
- * @param {boolean} inModalMode Sets whether we're in modal interaction mode.
369
- */
370
- goog.editor.Field.prototype.setModalMode = function(inModalMode) {
371
- this.inModalMode_ = inModalMode;
372
- };
373
-
374
-
375
- /**
376
- * Returns a string usable as a hash code for this field. For field's
377
- * that were created with an id, the hash code is guaranteed to be the id.
378
- * TODO(user): I think we can get rid of this. Seems only used from editor.
379
- * @return {string} The hash code for this editable field.
380
- */
381
- goog.editor.Field.prototype.getHashCode = function() {
382
- return this.hashCode_;
383
- };
384
-
385
-
386
- /**
387
- * Returns the editable DOM element or null if this field
388
- * is not editable.
389
- * <p>On IE or Safari this is the element with contentEditable=true
390
- * (in whitebox mode, the iFrame body).
391
- * <p>On Gecko this is the iFrame body
392
- * TODO(user): How do we word this for subclass version?
393
- * @return {Element} The editable DOM element, defined as above.
394
- */
395
- goog.editor.Field.prototype.getElement = function() {
396
- return this.field;
397
- };
398
-
399
-
400
- /**
401
- * Returns original DOM element that is being made editable by Trogedit or
402
- * null if that element has not yet been found in the appropriate document.
403
- * @return {Element} The original element.
404
- */
405
- goog.editor.Field.prototype.getOriginalElement = function() {
406
- return this.originalElement;
407
- };
408
-
409
-
410
- /**
411
- * Registers a keyboard event listener on the field. This is necessary for
412
- * Gecko since the fields are contained in an iFrame and there is no way to
413
- * auto-propagate key events up to the main window.
414
- * @param {string|Array.<string>} type Event type to listen for or array of
415
- * event types, for example goog.events.EventType.KEYDOWN.
416
- * @param {Function} listener Function to be used as the listener.
417
- * @param {boolean=} opt_capture Whether to use capture phase (optional,
418
- * defaults to false).
419
- * @param {Object=} opt_handler Object in whose scope to call the listener.
420
- */
421
- goog.editor.Field.prototype.addListener = function(type, listener, opt_capture,
422
- opt_handler) {
423
- var elem = this.getElement();
424
- // Opera won't fire events on <body> in whitebox mode because we make
425
- // <html> contentEditable to work around some visual issues.
426
- // So, if the parent node is contentEditable, listen to events on it instead.
427
- if (!goog.editor.BrowserFeature.FOCUSES_EDITABLE_BODY_ON_HTML_CLICK &&
428
- elem.parentNode.contentEditable) {
429
- elem = elem.parentNode;
430
- }
431
- // On Gecko, keyboard events only reliably fire on the document element.
432
- if (elem && goog.editor.BrowserFeature.USE_DOCUMENT_FOR_KEY_EVENTS) {
433
- elem = elem.ownerDocument;
434
- }
435
- this.eventRegister.listen(elem, type, listener, opt_capture, opt_handler);
436
- };
437
-
438
-
439
- /**
440
- * Returns the registered plugin with the given classId.
441
- * @param {string} classId classId of the plugin.
442
- * @return {goog.editor.Plugin} Registered plugin with the given classId.
443
- */
444
- goog.editor.Field.prototype.getPluginByClassId = function(classId) {
445
- return this.plugins_[classId];
446
- };
447
-
448
-
449
- /**
450
- * Registers the plugin with the editable field.
451
- * @param {goog.editor.Plugin} plugin The plugin to register.
452
- */
453
- goog.editor.Field.prototype.registerPlugin = function(plugin) {
454
- var classId = plugin.getTrogClassId();
455
- if (this.plugins_[classId]) {
456
- this.logger.severe('Cannot register the same class of plugin twice.');
457
- }
458
- this.plugins_[classId] = plugin;
459
-
460
- // Only key events and execute should have these has* functions with a custom
461
- // handler array since they need to be very careful about performance.
462
- // The rest of the plugin hooks should be event-based.
463
- for (var op in goog.editor.Plugin.OPCODE) {
464
- var opcode = goog.editor.Plugin.OPCODE[op];
465
- if (plugin[opcode]) {
466
- this.indexedPlugins_[op].push(plugin);
467
- }
468
- }
469
- plugin.registerFieldObject(this);
470
-
471
- // By default we enable all plugins for fields that are currently loaded.
472
- if (this.isLoaded()) {
473
- plugin.enable(this);
474
- }
475
- };
476
-
477
-
478
- /**
479
- * Unregisters the plugin with this field.
480
- * @param {goog.editor.Plugin} plugin The plugin to unregister.
481
- */
482
- goog.editor.Field.prototype.unregisterPlugin = function(plugin) {
483
- var classId = plugin.getTrogClassId();
484
- if (!this.plugins_[classId]) {
485
- this.logger.severe('Cannot unregister a plugin that isn\'t registered.');
486
- }
487
- delete this.plugins_[classId];
488
-
489
- for (var op in goog.editor.Plugin.OPCODE) {
490
- var opcode = goog.editor.Plugin.OPCODE[op];
491
- if (plugin[opcode]) {
492
- goog.array.remove(this.indexedPlugins_[op], plugin);
493
- }
494
- }
495
-
496
- plugin.unregisterFieldObject(this);
497
- };
498
-
499
-
500
- /**
501
- * Sets the value that will replace the style attribute of this field's
502
- * element when the field is made non-editable. This method is called with the
503
- * current value of the style attribute when the field is made editable.
504
- * @param {string} cssText The value of the style attribute.
505
- */
506
- goog.editor.Field.prototype.setInitialStyle = function(cssText) {
507
- this.cssText = cssText;
508
- };
509
-
510
-
511
- /**
512
- * Reset the properties on the original field element to how it was before
513
- * it was made editable.
514
- */
515
- goog.editor.Field.prototype.resetOriginalElemProperties = function() {
516
- var field = this.getOriginalElement();
517
- field.removeAttribute('contentEditable');
518
- field.removeAttribute('g_editable');
519
-
520
- if (!this.id) {
521
- field.removeAttribute('id');
522
- } else {
523
- field.id = this.id;
524
- }
525
-
526
- field.className = this.savedClassName_ || '';
527
-
528
- var cssText = this.cssText;
529
- if (!cssText) {
530
- field.removeAttribute('style');
531
- } else {
532
- goog.dom.setProperties(field, {'style' : cssText});
533
- }
534
-
535
- if (goog.isString(this.originalFieldLineHeight_)) {
536
- goog.style.setStyle(field, 'lineHeight', this.originalFieldLineHeight_);
537
- this.originalFieldLineHeight_ = null;
538
- }
539
- };
540
-
541
-
542
- /**
543
- * Checks the modified state of the field.
544
- * Note: Changes that take place while the goog.editor.Field.EventType.CHANGE
545
- * event is stopped do not effect the modified state.
546
- * @param {boolean=} opt_useIsEverModified Set to true to check if the field
547
- * has ever been modified since it was created, otherwise checks if the field
548
- * has been modified since the last goog.editor.Field.EventType.DELAYEDCHANGE
549
- * event was dispatched.
550
- * @return {boolean} Whether the field has been modified.
551
- */
552
- goog.editor.Field.prototype.isModified = function(opt_useIsEverModified) {
553
- return opt_useIsEverModified ? this.isEverModified_ : this.isModified_;
554
- };
555
-
556
-
557
- /**
558
- * Number of milliseconds after a change when the change event should be fired.
559
- * @type {number}
560
- */
561
- goog.editor.Field.CHANGE_FREQUENCY = 15;
562
-
563
-
564
- /**
565
- * Number of milliseconds between delayed change events.
566
- * @type {number}
567
- */
568
- goog.editor.Field.DELAYED_CHANGE_FREQUENCY = 250;
569
-
570
-
571
- /**
572
- * @return {boolean} Whether the field is implemented as an iframe.
573
- */
574
- goog.editor.Field.prototype.usesIframe = goog.functions.TRUE;
575
-
576
-
577
- /**
578
- * @return {boolean} Whether the field should be rendered with a fixed
579
- * height, or should expand to fit its contents.
580
- */
581
- goog.editor.Field.prototype.isFixedHeight = goog.functions.TRUE;
582
-
583
-
584
- /**
585
- * Map of keyCodes (not charCodes) that cause changes in the field contents.
586
- * @type {Object}
587
- * @private
588
- */
589
- goog.editor.Field.KEYS_CAUSING_CHANGES_ = {
590
- 46: true, // DEL
591
- 8: true // BACKSPACE
592
- };
593
-
594
- if (!goog.userAgent.IE) {
595
- // Only IE doesn't change the field by default upon tab.
596
- // TODO(user): This really isn't right now that we have tab plugins.
597
- goog.editor.Field.KEYS_CAUSING_CHANGES_[9] = true; // TAB
598
- }
599
-
600
-
601
- /**
602
- * Map of keyCodes (not charCodes) that when used in conjunction with the
603
- * Ctrl key cause changes in the field contents. These are the keys that are
604
- * not handled by basic formatting trogedit plugins.
605
- * @type {Object}
606
- * @private
607
- */
608
- goog.editor.Field.CTRL_KEYS_CAUSING_CHANGES_ = {
609
- 86: true, // V
610
- 88: true // X
611
- };
612
-
613
- if (goog.userAgent.IE) {
614
- // In IE input from IME (Input Method Editor) does not generate keypress
615
- // event so we have to rely on the keydown event. This way we have
616
- // false positives while the user is using keyboard to select the
617
- // character to input, but it is still better than the false negatives
618
- // that ignores user's final input at all.
619
- goog.editor.Field.KEYS_CAUSING_CHANGES_[229] = true; // from IME;
620
- }
621
-
622
-
623
- /**
624
- * Returns true if the keypress generates a change in contents.
625
- * @param {goog.events.BrowserEvent} e The event.
626
- * @param {boolean} testAllKeys True to test for all types of generating keys.
627
- * False to test for only the keys found in
628
- * goog.editor.Field.KEYS_CAUSING_CHANGES_.
629
- * @return {boolean} Whether the keypress generates a change in contents.
630
- * @private
631
- */
632
- goog.editor.Field.isGeneratingKey_ = function(e, testAllKeys) {
633
- if (goog.editor.Field.isSpecialGeneratingKey_(e)) {
634
- return true;
635
- }
636
-
637
- return !!(testAllKeys && !(e.ctrlKey || e.metaKey) &&
638
- (!goog.userAgent.GECKO || e.charCode));
639
- };
640
-
641
-
642
- /**
643
- * Returns true if the keypress generates a change in the contents.
644
- * due to a special key listed in goog.editor.Field.KEYS_CAUSING_CHANGES_
645
- * @param {goog.events.BrowserEvent} e The event.
646
- * @return {boolean} Whether the keypress generated a change in the contents.
647
- * @private
648
- */
649
- goog.editor.Field.isSpecialGeneratingKey_ = function(e) {
650
- var testCtrlKeys = (e.ctrlKey || e.metaKey) &&
651
- e.keyCode in goog.editor.Field.CTRL_KEYS_CAUSING_CHANGES_;
652
- var testRegularKeys = !(e.ctrlKey || e.metaKey) &&
653
- e.keyCode in goog.editor.Field.KEYS_CAUSING_CHANGES_;
654
-
655
- return testCtrlKeys || testRegularKeys;
656
- };
657
-
658
-
659
- /**
660
- * Sets the application window.
661
- * @param {!Window} appWindow The window where dialogs and bubbles should be
662
- * rendered.
663
- */
664
- goog.editor.Field.prototype.setAppWindow = function(appWindow) {
665
- this.appWindow_ = appWindow;
666
- };
667
-
668
-
669
- /**
670
- * Returns the "application" window, where dialogs and bubbles
671
- * should be rendered.
672
- * @return {!Window} The window.
673
- */
674
- goog.editor.Field.prototype.getAppWindow = function() {
675
- return this.appWindow_;
676
- };
677
-
678
-
679
- /**
680
- * Sets the zIndex that the field should be based off of.
681
- * TODO(user): Get rid of this completely. Here for Sites.
682
- * Should this be set directly on UI plugins?
683
- *
684
- * @param {number} zindex The base zIndex of the editor.
685
- */
686
- goog.editor.Field.prototype.setBaseZindex = function(zindex) {
687
- this.baseZindex_ = zindex;
688
- };
689
-
690
-
691
- /**
692
- * Returns the zindex of the base level of the field.
693
- *
694
- * @return {number} The base zindex of the editor.
695
- */
696
- goog.editor.Field.prototype.getBaseZindex = function() {
697
- return this.baseZindex_ || 0;
698
- };
699
-
700
-
701
- /**
702
- * Sets up the field object and window util of this field, and enables this
703
- * editable field with all registered plugins.
704
- * This is essential to the initialization of the field.
705
- * It must be called when the field becomes fully loaded and editable.
706
- * @param {Element} field The field property.
707
- * @protected
708
- */
709
- goog.editor.Field.prototype.setupFieldObject = function(field) {
710
- this.loadState_ = goog.editor.Field.LoadState_.EDITABLE;
711
- this.field = field;
712
- this.editableDomHelper = goog.dom.getDomHelper(field);
713
- this.isModified_ = false;
714
- this.isEverModified_ = false;
715
- field.setAttribute('g_editable', 'true');
716
- };
717
-
718
-
719
- /**
720
- * Help make the field not editable by setting internal data structures to null,
721
- * and disabling this field with all registered plugins.
722
- * @private
723
- */
724
- goog.editor.Field.prototype.tearDownFieldObject_ = function() {
725
- this.loadState_ = goog.editor.Field.LoadState_.UNEDITABLE;
726
-
727
- for (var classId in this.plugins_) {
728
- var plugin = this.plugins_[classId];
729
- if (!plugin.activeOnUneditableFields()) {
730
- plugin.disable(this);
731
- }
732
- }
733
-
734
- this.field = null;
735
- this.editableDomHelper = null;
736
- };
737
-
738
-
739
- /**
740
- * Initialize listeners on the field.
741
- * @private
742
- */
743
- goog.editor.Field.prototype.setupChangeListeners_ = function() {
744
- if (goog.userAgent.OPERA && this.usesIframe()) {
745
- // We can't use addListener here because we need to listen on
746
- // the document, not the editable element.
747
- this.eventRegister.listen(this.getEditableDomHelper().getDocument(),
748
- goog.events.EventType.FOCUS,
749
- this.dispatchFocusAndBeforeFocus_);
750
- this.eventRegister.listen(this.getEditableDomHelper().getDocument(),
751
- goog.events.EventType.BLUR,
752
- this.dispatchBlur);
753
- } else {
754
- if (goog.editor.BrowserFeature.SUPPORTS_FOCUSIN) {
755
- this.addListener(goog.events.EventType.FOCUS, this.dispatchFocus_);
756
- this.addListener(goog.events.EventType.FOCUSIN,
757
- this.dispatchBeforeFocus_);
758
- } else {
759
- this.addListener(goog.events.EventType.FOCUS,
760
- this.dispatchFocusAndBeforeFocus_);
761
- }
762
- this.addListener(goog.events.EventType.BLUR, this.dispatchBlur,
763
- goog.editor.BrowserFeature.USE_MUTATION_EVENTS);
764
- }
765
-
766
- if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
767
- // Ways to detect changes in Mozilla:
768
- //
769
- // keypress - check event.charCode (only typable characters has a
770
- // charCode), but also keyboard commands lile Ctrl+C will
771
- // return a charCode.
772
- // dragdrop - fires when the user drops something. This does not necessary
773
- // lead to a change but we cannot detect if it will or not
774
- //
775
- // Known Issues: We cannot detect cut and paste using menus
776
- // We cannot detect when someone moves something out of the
777
- // field using drag and drop.
778
- //
779
- this.setupMutationEventHandlersGecko();
780
- } else {
781
- // Ways to detect that a change is about to happen in other browsers.
782
- // (IE and Safari have these events. Opera appears to work, but we haven't
783
- // researched it.)
784
- //
785
- // onbeforepaste
786
- // onbeforecut
787
- // ondrop - happens when the user drops something on the editable text
788
- // field the value at this time does not contain the dropped text
789
- // ondragleave - when the user drags something from the current document.
790
- // This might not cause a change if the action was copy
791
- // instead of move
792
- // onkeypress - IE only fires keypress events if the key will generate
793
- // output. It will not trigger for delete and backspace
794
- // onkeydown - For delete and backspace
795
- //
796
- // known issues: IE triggers beforepaste just by opening the edit menu
797
- // delete at the end should not cause beforechange
798
- // backspace at the beginning should not cause beforechange
799
- // see above in ondragleave
800
- // TODO(user): Why don't we dispatchBeforeChange from the
801
- // handleDrop event for all browsers?
802
- this.addListener(['beforecut', 'beforepaste', 'drop', 'dragend'],
803
- this.dispatchBeforeChange);
804
- this.addListener(['cut', 'paste'], this.dispatchChange);
805
- this.addListener('drop', this.handleDrop_);
806
- }
807
-
808
- // TODO(user): Figure out why we use dragend vs dragdrop and
809
- // document this better.
810
- var dropEventName = goog.userAgent.WEBKIT ? 'dragend' : 'dragdrop';
811
- this.addListener(dropEventName, this.handleDrop_);
812
-
813
- this.addListener(goog.events.EventType.KEYDOWN, this.handleKeyDown_);
814
- this.addListener(goog.events.EventType.KEYPRESS, this.handleKeyPress_);
815
- this.addListener(goog.events.EventType.KEYUP, this.handleKeyUp_);
816
-
817
- this.selectionChangeTimer_ =
818
- new goog.async.Delay(this.handleSelectionChangeTimer_,
819
- goog.editor.Field.SELECTION_CHANGE_FREQUENCY_, this);
820
-
821
- if (goog.editor.BrowserFeature.FOLLOWS_EDITABLE_LINKS) {
822
- this.addListener(
823
- goog.events.EventType.CLICK, goog.editor.Field.cancelLinkClick_);
824
- }
825
-
826
- this.addListener(goog.events.EventType.MOUSEDOWN, this.handleMouseDown_);
827
- this.addListener(goog.events.EventType.MOUSEUP, this.handleMouseUp_);
828
- };
829
-
830
-
831
- /**
832
- * Frequency to check for selection changes.
833
- * @type {number}
834
- * @private
835
- */
836
- goog.editor.Field.SELECTION_CHANGE_FREQUENCY_ = 250;
837
-
838
-
839
- /**
840
- * Stops all listeners and timers.
841
- * @private
842
- */
843
- goog.editor.Field.prototype.clearListeners_ = function() {
844
- if (this.eventRegister) {
845
- this.eventRegister.removeAll();
846
- }
847
-
848
- if (this.changeTimerGecko_) {
849
- this.changeTimerGecko_.stop();
850
- }
851
- this.delayedChangeTimer_.stop();
852
- };
853
-
854
-
855
- /**
856
- * Removes all listeners and destroys the eventhandler object.
857
- * @override
858
- */
859
- goog.editor.Field.prototype.disposeInternal = function() {
860
- if (this.isLoading() || this.isLoaded()) {
861
- this.logger.warning('Disposing a field that is in use.');
862
- }
863
-
864
- if (this.getOriginalElement()) {
865
- this.execCommand(goog.editor.Command.CLEAR_LOREM);
866
- }
867
-
868
- this.tearDownFieldObject_();
869
- this.clearListeners_();
870
- this.originalDomHelper = null;
871
-
872
- if (this.eventRegister) {
873
- this.eventRegister.dispose();
874
- this.eventRegister = null;
875
- }
876
-
877
- this.removeAllWrappers();
878
-
879
- if (goog.editor.Field.getActiveFieldId() == this.id) {
880
- goog.editor.Field.setActiveFieldId(null);
881
- }
882
-
883
- for (var classId in this.plugins_) {
884
- var plugin = this.plugins_[classId];
885
- if (plugin.isAutoDispose()) {
886
- plugin.dispose();
887
- }
888
- }
889
- delete(this.plugins_);
890
-
891
- goog.editor.Field.superClass_.disposeInternal.call(this);
892
- };
893
-
894
-
895
- /**
896
- * Attach an wrapper to this field, to be thrown out when the field
897
- * is disposed.
898
- * @param {goog.Disposable} wrapper The wrapper to attach.
899
- */
900
- goog.editor.Field.prototype.attachWrapper = function(wrapper) {
901
- this.wrappers_.push(wrapper);
902
- };
903
-
904
-
905
- /**
906
- * Removes all wrappers and destroys them.
907
- */
908
- goog.editor.Field.prototype.removeAllWrappers = function() {
909
- var wrapper;
910
- while (wrapper = this.wrappers_.pop()) {
911
- wrapper.dispose();
912
- }
913
- };
914
-
915
-
916
- /**
917
- * List of mutation events in Gecko browsers.
918
- * @type {Array.<string>}
919
- * @protected
920
- */
921
- goog.editor.Field.MUTATION_EVENTS_GECKO = [
922
- 'DOMNodeInserted',
923
- 'DOMNodeRemoved',
924
- 'DOMNodeRemovedFromDocument',
925
- 'DOMNodeInsertedIntoDocument',
926
- 'DOMCharacterDataModified'
927
- ];
928
-
929
-
930
- /**
931
- * Mutation events tell us when something has changed for mozilla.
932
- * @protected
933
- */
934
- goog.editor.Field.prototype.setupMutationEventHandlersGecko = function() {
935
- if (goog.editor.BrowserFeature.HAS_DOM_SUBTREE_MODIFIED_EVENT) {
936
- this.eventRegister.listen(this.getElement(), 'DOMSubtreeModified',
937
- this.handleMutationEventGecko_);
938
- } else {
939
- var doc = this.getEditableDomHelper().getDocument();
940
- this.eventRegister.listen(doc, goog.editor.Field.MUTATION_EVENTS_GECKO,
941
- this.handleMutationEventGecko_, true);
942
-
943
- // DOMAttrModified fires for a lot of events we want to ignore. This goes
944
- // through a different handler so that we can ignore many of these.
945
- this.eventRegister.listen(doc, 'DOMAttrModified',
946
- goog.bind(this.handleDomAttrChange, this,
947
- this.handleMutationEventGecko_),
948
- true);
949
- }
950
- };
951
-
952
-
953
- /**
954
- * Handle before change key events and fire the beforetab event if appropriate.
955
- * This needs to happen on keydown in IE and keypress in FF.
956
- * @param {goog.events.BrowserEvent} e The browser event.
957
- * @return {boolean} Whether to still perform the default key action. Only set
958
- * to true if the actual event has already been canceled.
959
- * @private
960
- */
961
- goog.editor.Field.prototype.handleBeforeChangeKeyEvent_ = function(e) {
962
- // There are two reasons to block a key:
963
- var block =
964
- // #1: to intercept a tab
965
- // TODO: possibly don't allow clients to intercept tabs outside of LIs and
966
- // maybe tables as well?
967
- (e.keyCode == goog.events.KeyCodes.TAB && !this.dispatchBeforeTab_(e)) ||
968
- // #2: to block a Firefox-specific bug where Macs try to navigate
969
- // back a page when you hit command+left arrow or comamnd-right arrow.
970
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=341886
971
- // TODO(nicksantos): Get Firefox to fix this.
972
- (goog.userAgent.GECKO && e.metaKey &&
973
- (e.keyCode == goog.events.KeyCodes.LEFT ||
974
- e.keyCode == goog.events.KeyCodes.RIGHT));
975
-
976
- if (block) {
977
- e.preventDefault();
978
- return false;
979
- } else {
980
- // In Gecko we have both keyCode and charCode. charCode is for human
981
- // readable characters like a, b and c. However pressing ctrl+c and so on
982
- // also causes charCode to be set.
983
-
984
- // TODO(user): Del at end of field or backspace at beginning should be
985
- // ignored.
986
- this.gotGeneratingKey_ = e.charCode ||
987
- goog.editor.Field.isGeneratingKey_(e, goog.userAgent.GECKO);
988
- if (this.gotGeneratingKey_) {
989
- this.dispatchBeforeChange();
990
- // TODO(robbyw): Should we return the value of the above?
991
- }
992
- }
993
-
994
- return true;
995
- };
996
-
997
-
998
- /**
999
- * Keycodes that result in a selectionchange event (e.g. the cursor moving).
1000
- * @enum {number}
1001
- * @private
1002
- */
1003
- goog.editor.Field.SELECTION_CHANGE_KEYCODES_ = {
1004
- 8: 1, // backspace
1005
- 9: 1, // tab
1006
- 13: 1, // enter
1007
- 33: 1, // page up
1008
- 34: 1, // page down
1009
- 35: 1, // end
1010
- 36: 1, // home
1011
- 37: 1, // left
1012
- 38: 1, // up
1013
- 39: 1, // right
1014
- 40: 1, // down
1015
- 46: 1 // delete
1016
- };
1017
-
1018
-
1019
- /**
1020
- * Map of keyCodes (not charCodes) that when used in conjunction with the
1021
- * Ctrl key cause selection changes in the field contents. These are the keys
1022
- * that are not handled by the basic formatting trogedit plugins. Note that
1023
- * combinations like Ctrl-left etc are already handled in
1024
- * SELECTION_CHANGE_KEYCODES_
1025
- * @type {Object}
1026
- * @private
1027
- */
1028
- goog.editor.Field.CTRL_KEYS_CAUSING_SELECTION_CHANGES_ = {
1029
- 65: true, // A
1030
- 86: true, // V
1031
- 88: true // X
1032
- };
1033
-
1034
-
1035
- /**
1036
- * Map of keyCodes (not charCodes) that might need to be handled as a keyboard
1037
- * shortcut (even when ctrl/meta key is not pressed) by some plugin. Currently
1038
- * it is a small list. If it grows too big we can optimize it by using ranges
1039
- * or extending it from SELECTION_CHANGE_KEYCODES_
1040
- * @type {Object}
1041
- * @private
1042
- */
1043
- goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_ = {
1044
- 8: 1, // backspace
1045
- 9: 1, // tab
1046
- 13: 1, // enter
1047
- 27: 1, // esc
1048
- 33: 1, // page up
1049
- 34: 1, // page down
1050
- 37: 1, // left
1051
- 38: 1, // up
1052
- 39: 1, // right
1053
- 40: 1 // down
1054
- };
1055
-
1056
-
1057
- /**
1058
- * Calls all the plugins of the given operation, in sequence, with the
1059
- * given arguments. This is short-circuiting: once one plugin cancels
1060
- * the event, no more plugins will be invoked.
1061
- * @param {goog.editor.Plugin.Op} op A plugin op.
1062
- * @param {...*} var_args The arguments to the plugin.
1063
- * @return {boolean} True if one of the plugins cancel the event, false
1064
- * otherwise.
1065
- * @private
1066
- */
1067
- goog.editor.Field.prototype.invokeShortCircuitingOp_ = function(op, var_args) {
1068
- var plugins = this.indexedPlugins_[op];
1069
- var argList = goog.array.slice(arguments, 1);
1070
- for (var i = 0; i < plugins.length; ++i) {
1071
- // If the plugin returns true, that means it handled the event and
1072
- // we shouldn't propagate to the other plugins.
1073
- var plugin = plugins[i];
1074
- if ((plugin.isEnabled(this) ||
1075
- goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) &&
1076
- plugin[goog.editor.Plugin.OPCODE[op]].apply(plugin, argList)) {
1077
- // Only one plugin is allowed to handle the event. If for some reason
1078
- // a plugin wants to handle it and still allow other plugins to handle
1079
- // it, it shouldn't return true.
1080
- return true;
1081
- }
1082
- }
1083
-
1084
- return false;
1085
- };
1086
-
1087
-
1088
- /**
1089
- * Invoke this operation on all plugins with the given arguments.
1090
- * @param {goog.editor.Plugin.Op} op A plugin op.
1091
- * @param {...*} var_args The arguments to the plugin.
1092
- * @private
1093
- */
1094
- goog.editor.Field.prototype.invokeOp_ = function(op, var_args) {
1095
- var plugins = this.indexedPlugins_[op];
1096
- var argList = goog.array.slice(arguments, 1);
1097
- for (var i = 0; i < plugins.length; ++i) {
1098
- var plugin = plugins[i];
1099
- if (plugin.isEnabled(this) ||
1100
- goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) {
1101
- plugin[goog.editor.Plugin.OPCODE[op]].apply(plugin, argList);
1102
- }
1103
- }
1104
- };
1105
-
1106
-
1107
- /**
1108
- * Reduce this argument over all plugins. The result of each plugin invocation
1109
- * will be passed to the next plugin invocation. See goog.array.reduce.
1110
- * @param {goog.editor.Plugin.Op} op A plugin op.
1111
- * @param {string} arg The argument to reduce. For now, we assume it's a
1112
- * string, but we should widen this later if there are reducing
1113
- * plugins that don't operate on strings.
1114
- * @param {...*} var_args Any extra arguments to pass to the plugin. These args
1115
- * will not be reduced.
1116
- * @return {string} The reduced argument.
1117
- * @private
1118
- */
1119
- goog.editor.Field.prototype.reduceOp_ = function(op, arg, var_args) {
1120
- var plugins = this.indexedPlugins_[op];
1121
- var argList = goog.array.slice(arguments, 1);
1122
- for (var i = 0; i < plugins.length; ++i) {
1123
- var plugin = plugins[i];
1124
- if (plugin.isEnabled(this) ||
1125
- goog.editor.Plugin.IRREPRESSIBLE_OPS[op]) {
1126
- argList[0] = plugin[goog.editor.Plugin.OPCODE[op]].apply(
1127
- plugin, argList);
1128
- }
1129
- }
1130
- return argList[0];
1131
- };
1132
-
1133
-
1134
- /**
1135
- * Prepare the given contents, then inject them into the editable field.
1136
- * @param {?string} contents The contents to prepare.
1137
- * @param {Element} field The field element.
1138
- * @protected
1139
- */
1140
- goog.editor.Field.prototype.injectContents = function(contents, field) {
1141
- var styles = {};
1142
- var newHtml = this.getInjectableContents(contents, styles);
1143
- goog.style.setStyle(field, styles);
1144
- field.innerHTML = newHtml;
1145
- };
1146
-
1147
-
1148
- /**
1149
- * Returns prepared contents that can be injected into the editable field.
1150
- * @param {?string} contents The contents to prepare.
1151
- * @param {Object} styles A map that will be populated with styles that should
1152
- * be applied to the field element together with the contents.
1153
- * @return {string} The prepared contents.
1154
- */
1155
- goog.editor.Field.prototype.getInjectableContents = function(contents, styles) {
1156
- return this.reduceOp_(
1157
- goog.editor.Plugin.Op.PREPARE_CONTENTS_HTML, contents || '', styles);
1158
- };
1159
-
1160
-
1161
- /**
1162
- * Handles keydown on the field.
1163
- * @param {goog.events.BrowserEvent} e The browser event.
1164
- * @private
1165
- */
1166
- goog.editor.Field.prototype.handleKeyDown_ = function(e) {
1167
- if (!goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
1168
- if (!this.handleBeforeChangeKeyEvent_(e)) {
1169
- return;
1170
- }
1171
- }
1172
-
1173
- if (!this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYDOWN, e) &&
1174
- goog.editor.BrowserFeature.USES_KEYDOWN) {
1175
- this.handleKeyboardShortcut_(e);
1176
- }
1177
- };
1178
-
1179
-
1180
- /**
1181
- * Handles keypress on the field.
1182
- * @param {goog.events.BrowserEvent} e The browser event.
1183
- * @private
1184
- */
1185
- goog.editor.Field.prototype.handleKeyPress_ = function(e) {
1186
- if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
1187
- if (!this.handleBeforeChangeKeyEvent_(e)) {
1188
- return;
1189
- }
1190
- } else {
1191
- // In IE only keys that generate output trigger keypress
1192
- // In Mozilla charCode is set for keys generating content.
1193
- this.gotGeneratingKey_ = true;
1194
- this.dispatchBeforeChange();
1195
- }
1196
-
1197
- if (!this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYPRESS, e) &&
1198
- !goog.editor.BrowserFeature.USES_KEYDOWN) {
1199
- this.handleKeyboardShortcut_(e);
1200
- }
1201
- };
1202
-
1203
-
1204
- /**
1205
- * Handles keyup on the field.
1206
- * @param {goog.events.BrowserEvent} e The browser event.
1207
- * @private
1208
- */
1209
- goog.editor.Field.prototype.handleKeyUp_ = function(e) {
1210
- if (!goog.editor.BrowserFeature.USE_MUTATION_EVENTS &&
1211
- (this.gotGeneratingKey_ ||
1212
- goog.editor.Field.isSpecialGeneratingKey_(e))) {
1213
- // The special keys won't have set the gotGeneratingKey flag, so we check
1214
- // for them explicitly
1215
- this.handleChange();
1216
- }
1217
-
1218
- this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.KEYUP, e);
1219
-
1220
- if (this.isEventStopped(goog.editor.Field.EventType.SELECTIONCHANGE)) {
1221
- return;
1222
- }
1223
-
1224
- if (goog.editor.Field.SELECTION_CHANGE_KEYCODES_[e.keyCode] ||
1225
- ((e.ctrlKey || e.metaKey) &&
1226
- goog.editor.Field.CTRL_KEYS_CAUSING_SELECTION_CHANGES_[e.keyCode])) {
1227
- this.selectionChangeTimer_.start();
1228
- }
1229
- };
1230
-
1231
-
1232
- /**
1233
- * Handles keyboard shortcuts on the field. Note that we bake this into our
1234
- * handleKeyPress/handleKeyDown rather than using goog.events.KeyHandler or
1235
- * goog.ui.KeyboardShortcutHandler for performance reasons. Since these
1236
- * are handled on every key stroke, we do not want to be going out to the
1237
- * event system every time.
1238
- * @param {goog.events.BrowserEvent} e The browser event.
1239
- * @private
1240
- */
1241
- goog.editor.Field.prototype.handleKeyboardShortcut_ = function(e) {
1242
- // Alt key is used for i18n languages to enter certain characters. like
1243
- // control + alt + z (used for IMEs) and control + alt + s for Polish.
1244
- // So we don't invoke handleKeyboardShortcut at all for alt keys.
1245
- if (e.altKey) {
1246
- return;
1247
- }
1248
-
1249
- var isModifierPressed = goog.userAgent.MAC ? e.metaKey : e.ctrlKey;
1250
- if (isModifierPressed ||
1251
- goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_[e.keyCode]) {
1252
- // TODO(user): goog.events.KeyHandler uses much more complicated logic
1253
- // to determine key. Consider changing to what they do.
1254
- var key = e.charCode || e.keyCode;
1255
-
1256
- if (key == 17) { // Ctrl key
1257
- // In IE and Webkit pressing Ctrl key itself results in this event.
1258
- return;
1259
- }
1260
-
1261
- var stringKey = String.fromCharCode(key).toLowerCase();
1262
- if (this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.SHORTCUT,
1263
- e, stringKey, isModifierPressed)) {
1264
- e.preventDefault();
1265
- // We don't call stopPropagation as some other handler outside of
1266
- // trogedit might need it.
1267
- }
1268
- }
1269
- };
1270
-
1271
-
1272
- /**
1273
- * Executes an editing command as per the registered plugins.
1274
- * @param {string} command The command to execute.
1275
- * @param {...*} var_args Any additional parameters needed to execute the
1276
- * command.
1277
- * @return {*} False if the command wasn't handled, otherwise, the result of
1278
- * the command.
1279
- */
1280
- goog.editor.Field.prototype.execCommand = function(command, var_args) {
1281
- var args = arguments;
1282
- var result;
1283
-
1284
- var plugins = this.indexedPlugins_[goog.editor.Plugin.Op.EXEC_COMMAND];
1285
- for (var i = 0; i < plugins.length; ++i) {
1286
- // If the plugin supports the command, that means it handled the
1287
- // event and we shouldn't propagate to the other plugins.
1288
- var plugin = plugins[i];
1289
- if (plugin.isEnabled(this) && plugin.isSupportedCommand(command)) {
1290
- result = plugin.execCommand.apply(plugin, args);
1291
- break;
1292
- }
1293
- }
1294
-
1295
- return result;
1296
- };
1297
-
1298
-
1299
- /**
1300
- * Gets the value of command(s).
1301
- * @param {string|Array.<string>} commands String name(s) of the command.
1302
- * @return {*} Value of each command. Returns false (or array of falses)
1303
- * if designMode is off or the field is otherwise uneditable, and
1304
- * there are no activeOnUneditable plugins for the command.
1305
- */
1306
- goog.editor.Field.prototype.queryCommandValue = function(commands) {
1307
- var isEditable = this.isLoaded() && this.isSelectionEditable();
1308
- if (goog.isString(commands)) {
1309
- return this.queryCommandValueInternal_(commands, isEditable);
1310
- } else {
1311
- var state = {};
1312
- for (var i = 0; i < commands.length; i++) {
1313
- state[commands[i]] = this.queryCommandValueInternal_(commands[i],
1314
- isEditable);
1315
- }
1316
- return state;
1317
- }
1318
- };
1319
-
1320
-
1321
- /**
1322
- * Gets the value of this command.
1323
- * @param {string} command The command to check.
1324
- * @param {boolean} isEditable Whether the field is currently editable.
1325
- * @return {*} The state of this command. Null if not handled.
1326
- * False if the field is uneditable and there are no handlers for
1327
- * uneditable commands.
1328
- * @private
1329
- */
1330
- goog.editor.Field.prototype.queryCommandValueInternal_ = function(command,
1331
- isEditable) {
1332
- var plugins = this.indexedPlugins_[goog.editor.Plugin.Op.QUERY_COMMAND];
1333
- for (var i = 0; i < plugins.length; ++i) {
1334
- var plugin = plugins[i];
1335
- if (plugin.isEnabled(this) && plugin.isSupportedCommand(command) &&
1336
- (isEditable || plugin.activeOnUneditableFields())) {
1337
- return plugin.queryCommandValue(command);
1338
- }
1339
- }
1340
- return isEditable ? null : false;
1341
- };
1342
-
1343
-
1344
- /**
1345
- * Fires a change event only if the attribute change effects the editiable
1346
- * field. We ignore events that are internal browser events (ie scrollbar
1347
- * state change)
1348
- * @param {Function} handler The function to call if this is not an internal
1349
- * browser event.
1350
- * @param {goog.events.BrowserEvent} e The browser event.
1351
- * @protected
1352
- */
1353
- goog.editor.Field.prototype.handleDomAttrChange = function(handler, e) {
1354
- if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
1355
- return;
1356
- }
1357
-
1358
- e = e.getBrowserEvent();
1359
-
1360
- // For XUL elements, since we don't care what they are doing
1361
- try {
1362
- if (e.originalTarget.prefix || e.originalTarget.nodeName == 'scrollbar') {
1363
- return;
1364
- }
1365
- } catch (ex1) {
1366
- // Some XUL nodes don't like you reading their properties. If we got
1367
- // the exception, this implies a XUL node so we can return.
1368
- return;
1369
- }
1370
-
1371
- // Check if prev and new values are different, sometimes this fires when
1372
- // nothing has really changed.
1373
- if (e.prevValue == e.newValue) {
1374
- return;
1375
- }
1376
- handler.call(this, e);
1377
- };
1378
-
1379
-
1380
- /**
1381
- * Handle a mutation event.
1382
- * @param {goog.events.BrowserEvent|Event} e The browser event.
1383
- * @private
1384
- */
1385
- goog.editor.Field.prototype.handleMutationEventGecko_ = function(e) {
1386
- if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
1387
- return;
1388
- }
1389
-
1390
- e = e.getBrowserEvent ? e.getBrowserEvent() : e;
1391
- // For people with firebug, firebug sets this property on elements it is
1392
- // inserting into the dom.
1393
- if (e.target.firebugIgnore) {
1394
- return;
1395
- }
1396
-
1397
- this.isModified_ = true;
1398
- this.isEverModified_ = true;
1399
- this.changeTimerGecko_.start();
1400
- };
1401
-
1402
-
1403
- /**
1404
- * Handle drop events. Deal with focus/selection issues and set the document
1405
- * as changed.
1406
- * @param {goog.events.BrowserEvent} e The browser event.
1407
- * @private
1408
- */
1409
- goog.editor.Field.prototype.handleDrop_ = function(e) {
1410
- if (goog.userAgent.IE) {
1411
- // TODO(user): This should really be done in the loremipsum plugin.
1412
- this.execCommand(goog.editor.Command.CLEAR_LOREM, true);
1413
- }
1414
-
1415
- // TODO(user): I just moved this code to this location, but I wonder why
1416
- // it is only done for this case. Investigate.
1417
- if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
1418
- this.dispatchFocusAndBeforeFocus_();
1419
- }
1420
-
1421
- this.dispatchChange();
1422
- };
1423
-
1424
-
1425
- /**
1426
- * @return {HTMLIFrameElement} The iframe that's body is editable.
1427
- * @protected
1428
- */
1429
- goog.editor.Field.prototype.getEditableIframe = function() {
1430
- var dh;
1431
- if (this.usesIframe() && (dh = this.getEditableDomHelper())) {
1432
- // If the iframe has been destroyed, the dh could still exist since the
1433
- // node may not be gc'ed, but fetching the window can fail.
1434
- var win = dh.getWindow();
1435
- return /** @type {HTMLIFrameElement} */ (win && win.frameElement);
1436
- }
1437
- return null;
1438
- };
1439
-
1440
-
1441
- /**
1442
- * @return {goog.dom.DomHelper?} The dom helper for the editable node.
1443
- */
1444
- goog.editor.Field.prototype.getEditableDomHelper = function() {
1445
- return this.editableDomHelper;
1446
- };
1447
-
1448
-
1449
- /**
1450
- * @return {goog.dom.AbstractRange?} Closure range object wrapping the selection
1451
- * in this field or null if this field is not currently editable.
1452
- */
1453
- goog.editor.Field.prototype.getRange = function() {
1454
- var win = this.editableDomHelper && this.editableDomHelper.getWindow();
1455
- return win && goog.dom.Range.createFromWindow(win);
1456
- };
1457
-
1458
-
1459
- /**
1460
- * Dispatch a selection change event, optionally caused by the given browser
1461
- * event or selecting the given target.
1462
- * @param {goog.events.BrowserEvent=} opt_e Optional browser event causing this
1463
- * event.
1464
- * @param {Node=} opt_target The node the selection changed to.
1465
- */
1466
- goog.editor.Field.prototype.dispatchSelectionChangeEvent = function(
1467
- opt_e, opt_target) {
1468
- if (this.isEventStopped(goog.editor.Field.EventType.SELECTIONCHANGE)) {
1469
- return;
1470
- }
1471
-
1472
- // The selection is editable only if the selection is inside the
1473
- // editable field.
1474
- var range = this.getRange();
1475
- var rangeContainer = range && range.getContainerElement();
1476
- this.isSelectionEditable_ = !!rangeContainer &&
1477
- goog.dom.contains(this.getElement(), rangeContainer);
1478
-
1479
- this.dispatchCommandValueChange();
1480
- this.dispatchEvent({
1481
- type: goog.editor.Field.EventType.SELECTIONCHANGE,
1482
- originalType: opt_e && opt_e.type
1483
- });
1484
-
1485
- this.invokeShortCircuitingOp_(goog.editor.Plugin.Op.SELECTION,
1486
- opt_e, opt_target);
1487
- };
1488
-
1489
-
1490
- /**
1491
- * Dispatch a selection change event using a browser event that was
1492
- * asynchronously saved earlier.
1493
- * @private
1494
- */
1495
- goog.editor.Field.prototype.handleSelectionChangeTimer_ = function() {
1496
- var t = this.selectionChangeTarget_;
1497
- this.selectionChangeTarget_ = null;
1498
- this.dispatchSelectionChangeEvent(undefined, t);
1499
- };
1500
-
1501
-
1502
- /**
1503
- * This dispatches the beforechange event on the editable field
1504
- */
1505
- goog.editor.Field.prototype.dispatchBeforeChange = function() {
1506
- if (this.isEventStopped(goog.editor.Field.EventType.BEFORECHANGE)) {
1507
- return;
1508
- }
1509
-
1510
- this.dispatchEvent(goog.editor.Field.EventType.BEFORECHANGE);
1511
- };
1512
-
1513
-
1514
- /**
1515
- * This dispatches the beforetab event on the editable field. If this event is
1516
- * cancelled, then the default tab behavior is prevented.
1517
- * @param {goog.events.BrowserEvent} e The tab event.
1518
- * @private
1519
- * @return {boolean} The result of dispatchEvent.
1520
- */
1521
- goog.editor.Field.prototype.dispatchBeforeTab_ = function(e) {
1522
- return this.dispatchEvent({
1523
- type: goog.editor.Field.EventType.BEFORETAB,
1524
- shiftKey: e.shiftKey,
1525
- altKey: e.altKey,
1526
- ctrlKey: e.ctrlKey
1527
- });
1528
- };
1529
-
1530
-
1531
- /**
1532
- * Temporarily ignore change events. If the time has already been set, it will
1533
- * fire immediately now. Further setting of the timer is stopped and
1534
- * dispatching of events is stopped until startChangeEvents is called.
1535
- * @param {boolean=} opt_stopChange Whether to ignore base change events.
1536
- * @param {boolean=} opt_stopDelayedChange Whether to ignore delayed change
1537
- * events.
1538
- */
1539
- goog.editor.Field.prototype.stopChangeEvents = function(opt_stopChange,
1540
- opt_stopDelayedChange) {
1541
- if (opt_stopChange) {
1542
- if (this.changeTimerGecko_) {
1543
- this.changeTimerGecko_.fireIfActive();
1544
- }
1545
-
1546
- this.stopEvent(goog.editor.Field.EventType.CHANGE);
1547
- }
1548
- if (opt_stopDelayedChange) {
1549
- this.clearDelayedChange();
1550
- this.stopEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
1551
- }
1552
- };
1553
-
1554
-
1555
- /**
1556
- * Start change events again and fire once if desired.
1557
- * @param {boolean=} opt_fireChange Whether to fire the change event
1558
- * immediately.
1559
- * @param {boolean=} opt_fireDelayedChange Whether to fire the delayed change
1560
- * event immediately.
1561
- */
1562
- goog.editor.Field.prototype.startChangeEvents = function(opt_fireChange,
1563
- opt_fireDelayedChange) {
1564
-
1565
- if (!opt_fireChange && this.changeTimerGecko_) {
1566
- // In the case where change events were stopped and we're not firing
1567
- // them on start, the user was trying to suppress all change or delayed
1568
- // change events. Clear the change timer now while the events are still
1569
- // stopped so that its firing doesn't fire a stopped change event, or
1570
- // queue up a delayed change event that we were trying to stop.
1571
- this.changeTimerGecko_.fireIfActive();
1572
- }
1573
-
1574
- this.startEvent(goog.editor.Field.EventType.CHANGE);
1575
- this.startEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
1576
- if (opt_fireChange) {
1577
- this.handleChange();
1578
- }
1579
-
1580
- if (opt_fireDelayedChange) {
1581
- this.dispatchDelayedChange_();
1582
- }
1583
- };
1584
-
1585
-
1586
- /**
1587
- * Stops the event of the given type from being dispatched.
1588
- * @param {goog.editor.Field.EventType} eventType type of event to stop.
1589
- */
1590
- goog.editor.Field.prototype.stopEvent = function(eventType) {
1591
- this.stoppedEvents_[eventType] = 1;
1592
- };
1593
-
1594
-
1595
- /**
1596
- * Re-starts the event of the given type being dispatched, if it had
1597
- * previously been stopped with stopEvent().
1598
- * @param {goog.editor.Field.EventType} eventType type of event to start.
1599
- */
1600
- goog.editor.Field.prototype.startEvent = function(eventType) {
1601
- // Toggling this bit on/off instead of deleting it/re-adding it
1602
- // saves array allocations.
1603
- this.stoppedEvents_[eventType] = 0;
1604
- };
1605
-
1606
-
1607
- /**
1608
- * Block an event for a short amount of time. Intended
1609
- * for the situation where an event pair fires in quick succession
1610
- * (e.g., mousedown/mouseup, keydown/keyup, focus/blur),
1611
- * and we want the second event in the pair to get "debounced."
1612
- *
1613
- * WARNING: This should never be used to solve race conditions or for
1614
- * mission-critical actions. It should only be used for UI improvements,
1615
- * where it's okay if the behavior is non-deterministic.
1616
- *
1617
- * @param {goog.editor.Field.EventType} eventType type of event to debounce.
1618
- */
1619
- goog.editor.Field.prototype.debounceEvent = function(eventType) {
1620
- this.debouncedEvents_[eventType] = goog.now();
1621
- };
1622
-
1623
-
1624
- /**
1625
- * Checks if the event of the given type has stopped being dispatched
1626
- * @param {goog.editor.Field.EventType} eventType type of event to check.
1627
- * @return {boolean} true if the event has been stopped with stopEvent().
1628
- * @protected
1629
- */
1630
- goog.editor.Field.prototype.isEventStopped = function(eventType) {
1631
- return !!this.stoppedEvents_[eventType] ||
1632
- (this.debouncedEvents_[eventType] &&
1633
- (goog.now() - this.debouncedEvents_[eventType] <=
1634
- goog.editor.Field.DEBOUNCE_TIME_MS_));
1635
- };
1636
-
1637
-
1638
- /**
1639
- * Calls a function to manipulate the dom of this field. This method should be
1640
- * used whenever Trogedit clients need to modify the dom of the field, so that
1641
- * delayed change events are handled appropriately. Extra delayed change events
1642
- * will cause undesired states to be added to the undo-redo stack. This method
1643
- * will always fire at most one delayed change event, depending on the value of
1644
- * {@code opt_preventDelayedChange}.
1645
- *
1646
- * @param {function()} func The function to call that will manipulate the dom.
1647
- * @param {boolean=} opt_preventDelayedChange Whether delayed change should be
1648
- * prevented after calling {@code func}. Defaults to always firing
1649
- * delayed change.
1650
- * @param {Object=} opt_handler Object in whose scope to call the listener.
1651
- */
1652
- goog.editor.Field.prototype.manipulateDom = function(func,
1653
- opt_preventDelayedChange, opt_handler) {
1654
-
1655
- this.stopChangeEvents(true, true);
1656
- // We don't want any problems with the passed in function permanently
1657
- // stopping change events. That would break Trogedit.
1658
- try {
1659
- func.call(opt_handler);
1660
- } finally {
1661
- // If the field isn't loaded then change and delayed change events will be
1662
- // started as part of the onload behavior.
1663
- if (this.isLoaded()) {
1664
- // We assume that func always modified the dom and so fire a single change
1665
- // event. Delayed change is only fired if not prevented by the user.
1666
- if (opt_preventDelayedChange) {
1667
- this.startEvent(goog.editor.Field.EventType.CHANGE);
1668
- this.handleChange();
1669
- this.startEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
1670
- } else {
1671
- this.dispatchChange();
1672
- }
1673
- }
1674
- }
1675
- };
1676
-
1677
-
1678
- /**
1679
- * Dispatches a command value change event.
1680
- * @param {Array.<string>=} opt_commands Commands whose state has
1681
- * changed.
1682
- */
1683
- goog.editor.Field.prototype.dispatchCommandValueChange =
1684
- function(opt_commands) {
1685
- if (opt_commands) {
1686
- this.dispatchEvent({
1687
- type: goog.editor.Field.EventType.COMMAND_VALUE_CHANGE,
1688
- commands: opt_commands
1689
- });
1690
- } else {
1691
- this.dispatchEvent(goog.editor.Field.EventType.COMMAND_VALUE_CHANGE);
1692
- }
1693
- };
1694
-
1695
-
1696
- /**
1697
- * Dispatches the appropriate set of change events. This only fires
1698
- * synchronous change events in blended-mode, iframe-using mozilla. It just
1699
- * starts the appropriate timer for goog.editor.Field.EventType.DELAYEDCHANGE.
1700
- * This also starts up change events again if they were stopped.
1701
- *
1702
- * @param {boolean=} opt_noDelay True if
1703
- * goog.editor.Field.EventType.DELAYEDCHANGE should be fired syncronously.
1704
- */
1705
- goog.editor.Field.prototype.dispatchChange = function(opt_noDelay) {
1706
- this.startChangeEvents(true, opt_noDelay);
1707
- };
1708
-
1709
-
1710
- /**
1711
- * Handle a change in the Editable Field. Marks the field has modified,
1712
- * dispatches the change event on the editable field (moz only), starts the
1713
- * timer for the delayed change event. Note that these actions only occur if
1714
- * the proper events are not stopped.
1715
- */
1716
- goog.editor.Field.prototype.handleChange = function() {
1717
- if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {
1718
- return;
1719
- }
1720
-
1721
- // Clear the changeTimerGecko_ if it's active, since any manual call to
1722
- // handle change is equiavlent to changeTimerGecko_.fire().
1723
- if (this.changeTimerGecko_) {
1724
- this.changeTimerGecko_.stop();
1725
- }
1726
-
1727
- this.isModified_ = true;
1728
- this.isEverModified_ = true;
1729
-
1730
- if (this.isEventStopped(goog.editor.Field.EventType.DELAYEDCHANGE)) {
1731
- return;
1732
- }
1733
-
1734
- this.delayedChangeTimer_.start();
1735
- };
1736
-
1737
-
1738
- /**
1739
- * Dispatch a delayed change event.
1740
- * @private
1741
- */
1742
- goog.editor.Field.prototype.dispatchDelayedChange_ = function() {
1743
- if (this.isEventStopped(goog.editor.Field.EventType.DELAYEDCHANGE)) {
1744
- return;
1745
- }
1746
- // Clear the delayedChangeTimer_ if it's active, since any manual call to
1747
- // dispatchDelayedChange_ is equivalent to delayedChangeTimer_.fire().
1748
- this.delayedChangeTimer_.stop();
1749
- this.isModified_ = false;
1750
- this.dispatchEvent(goog.editor.Field.EventType.DELAYEDCHANGE);
1751
- };
1752
-
1753
-
1754
- /**
1755
- * Don't wait for the timer and just fire the delayed change event if it's
1756
- * pending.
1757
- */
1758
- goog.editor.Field.prototype.clearDelayedChange = function() {
1759
- // The changeTimerGecko_ will queue up a delayed change so to fully clear
1760
- // delayed change we must also clear this timer.
1761
- if (this.changeTimerGecko_) {
1762
- this.changeTimerGecko_.fireIfActive();
1763
- }
1764
- this.delayedChangeTimer_.fireIfActive();
1765
- };
1766
-
1767
-
1768
- /**
1769
- * Dispatch beforefocus and focus for FF. Note that both of these actually
1770
- * happen in the document's "focus" event. Unfortunately, we don't actually
1771
- * have a way of getting in before the focus event in FF (boo! hiss!).
1772
- * In IE, we use onfocusin for before focus and onfocus for focus.
1773
- * @private
1774
- */
1775
- goog.editor.Field.prototype.dispatchFocusAndBeforeFocus_ = function() {
1776
- this.dispatchBeforeFocus_();
1777
- this.dispatchFocus_();
1778
- };
1779
-
1780
-
1781
- /**
1782
- * Dispatches a before focus event.
1783
- * @private
1784
- */
1785
- goog.editor.Field.prototype.dispatchBeforeFocus_ = function() {
1786
- if (this.isEventStopped(goog.editor.Field.EventType.BEFOREFOCUS)) {
1787
- return;
1788
- }
1789
-
1790
- this.execCommand(goog.editor.Command.CLEAR_LOREM, true);
1791
- this.dispatchEvent(goog.editor.Field.EventType.BEFOREFOCUS);
1792
- };
1793
-
1794
-
1795
- /**
1796
- * Dispatches a focus event.
1797
- * @private
1798
- */
1799
- goog.editor.Field.prototype.dispatchFocus_ = function() {
1800
- if (this.isEventStopped(goog.editor.Field.EventType.FOCUS)) {
1801
- return;
1802
- }
1803
- goog.editor.Field.setActiveFieldId(this.id);
1804
-
1805
- this.isSelectionEditable_ = true;
1806
-
1807
- this.dispatchEvent(goog.editor.Field.EventType.FOCUS);
1808
-
1809
- if (goog.editor.BrowserFeature.
1810
- PUTS_CURSOR_BEFORE_FIRST_BLOCK_ELEMENT_ON_FOCUS) {
1811
- // If the cursor is at the beginning of the field, make sure that it is
1812
- // in the first user-visible line break, e.g.,
1813
- // no selection: <div><p>...</p></div> --> <div><p>|cursor|...</p></div>
1814
- // <div>|cursor|<p>...</p></div> --> <div><p>|cursor|...</p></div>
1815
- // <body>|cursor|<p>...</p></body> --> <body><p>|cursor|...</p></body>
1816
- var field = this.getElement();
1817
- var range = this.getRange();
1818
-
1819
- if (range) {
1820
- var focusNode = range.getFocusNode();
1821
- if (range.getFocusOffset() == 0 && (!focusNode || focusNode == field ||
1822
- focusNode.tagName == goog.dom.TagName.BODY)) {
1823
- goog.editor.range.selectNodeStart(field);
1824
- }
1825
- }
1826
- }
1827
-
1828
- if (!goog.editor.BrowserFeature.CLEARS_SELECTION_WHEN_FOCUS_LEAVES &&
1829
- this.usesIframe()) {
1830
- var parent = this.getEditableDomHelper().getWindow().parent;
1831
- parent.getSelection().removeAllRanges();
1832
- }
1833
- };
1834
-
1835
-
1836
- /**
1837
- * Dispatches a blur event.
1838
- * @protected
1839
- */
1840
- goog.editor.Field.prototype.dispatchBlur = function() {
1841
- if (this.isEventStopped(goog.editor.Field.EventType.BLUR)) {
1842
- return;
1843
- }
1844
-
1845
- // Another field may have already been registered as active, so only
1846
- // clear out the active field id if we still think this field is active.
1847
- if (goog.editor.Field.getActiveFieldId() == this.id) {
1848
- goog.editor.Field.setActiveFieldId(null);
1849
- }
1850
-
1851
- this.isSelectionEditable_ = false;
1852
- this.dispatchEvent(goog.editor.Field.EventType.BLUR);
1853
- };
1854
-
1855
-
1856
- /**
1857
- * @return {boolean} Whether the selection is editable.
1858
- */
1859
- goog.editor.Field.prototype.isSelectionEditable = function() {
1860
- return this.isSelectionEditable_;
1861
- };
1862
-
1863
-
1864
- /**
1865
- * Event handler for clicks in browsers that will follow a link when the user
1866
- * clicks, even if it's editable. We stop the click manually
1867
- * @param {goog.events.BrowserEvent} e The event.
1868
- * @private
1869
- */
1870
- goog.editor.Field.cancelLinkClick_ = function(e) {
1871
- if (goog.dom.getAncestorByTagNameAndClass(
1872
- /** @type {Node} */ (e.target), goog.dom.TagName.A)) {
1873
- e.preventDefault();
1874
- }
1875
- };
1876
-
1877
-
1878
- /**
1879
- * Handle mouse down inside the editable field.
1880
- * @param {goog.events.BrowserEvent} e The event.
1881
- * @private
1882
- */
1883
- goog.editor.Field.prototype.handleMouseDown_ = function(e) {
1884
- // If the user clicks on an object (like an image) in the field
1885
- // and the activeField is not set, set it.
1886
- if (!goog.editor.Field.getActiveFieldId()) {
1887
- goog.editor.Field.setActiveFieldId(this.id);
1888
- }
1889
-
1890
- // Open links in a new window if the user control + clicks.
1891
- if (goog.userAgent.IE) {
1892
- var targetElement = e.target;
1893
- if (targetElement &&
1894
- targetElement.tagName == goog.dom.TagName.A && e.ctrlKey) {
1895
- this.originalDomHelper.getWindow().open(targetElement.href);
1896
- }
1897
- }
1898
- };
1899
-
1900
-
1901
- /**
1902
- * Handle mouse up inside the editable field.
1903
- * @param {goog.events.BrowserEvent} e The event.
1904
- * @private
1905
- */
1906
- goog.editor.Field.prototype.handleMouseUp_ = function(e) {
1907
- /*
1908
- * We fire a selection change event immediately for listeners that depend on
1909
- * the native browser event object (e). On IE, a listener that tries to
1910
- * retrieve the selection with goog.dom.Range may see an out-of-date
1911
- * selection range.
1912
- */
1913
- this.dispatchSelectionChangeEvent(e);
1914
- if (goog.userAgent.IE) {
1915
- /*
1916
- * Fire a second selection change event for listeners that need an
1917
- * up-to-date selection range. Save the event's target to be sent with it
1918
- * (it's safer than saving a copy of the event itself).
1919
- */
1920
- this.selectionChangeTarget_ = /** @type {Node} */ (e.target);
1921
- this.selectionChangeTimer_.start();
1922
- }
1923
- };
1924
-
1925
-
1926
- /**
1927
- * Retrieve the HTML contents of a field.
1928
- *
1929
- * Do NOT just get the innerHTML of a field directly--there's a lot of
1930
- * processing that needs to happen.
1931
- * @return {string} The scrubbed contents of the field.
1932
- */
1933
- goog.editor.Field.prototype.getCleanContents = function() {
1934
- if (this.queryCommandValue(goog.editor.Command.USING_LOREM)) {
1935
- return goog.string.Unicode.NBSP;
1936
- }
1937
-
1938
- if (!this.isLoaded()) {
1939
- // The field is uneditable, so it's ok to read contents directly.
1940
- var elem = this.getOriginalElement();
1941
- if (!elem) {
1942
- this.logger.shout("Couldn't get the field element to read the contents");
1943
- }
1944
- return elem.innerHTML;
1945
- }
1946
-
1947
- var fieldCopy = this.getFieldCopy();
1948
-
1949
- // Allow the plugins to handle their cleanup.
1950
- this.invokeOp_(goog.editor.Plugin.Op.CLEAN_CONTENTS_DOM, fieldCopy);
1951
- return this.reduceOp_(
1952
- goog.editor.Plugin.Op.CLEAN_CONTENTS_HTML, fieldCopy.innerHTML);
1953
- };
1954
-
1955
-
1956
- /**
1957
- * Get the copy of the editable field element, which has the innerHTML set
1958
- * correctly.
1959
- * @return {Element} The copy of the editable field.
1960
- * @protected
1961
- */
1962
- goog.editor.Field.prototype.getFieldCopy = function() {
1963
- var field = this.getElement();
1964
- // Deep cloneNode strips some script tag contents in IE, so we do this.
1965
- var fieldCopy = /** @type {Element} */(field.cloneNode(false));
1966
-
1967
- // For some reason, when IE sets innerHtml of the cloned node, it strips
1968
- // script tags that fall at the beginning of an element. Appending a
1969
- // non-breaking space prevents this.
1970
- var html = field.innerHTML;
1971
- if (goog.userAgent.IE && html.match(/^\s*<script/i)) {
1972
- html = goog.string.Unicode.NBSP + html;
1973
- }
1974
- fieldCopy.innerHTML = html;
1975
- return fieldCopy;
1976
- };
1977
-
1978
-
1979
- /**
1980
- * Sets the contents of the field.
1981
- * @param {boolean} addParas Boolean to specify whether to add paragraphs
1982
- * to long fields.
1983
- * @param {?string} html html to insert. If html=null, then this defaults
1984
- * to a nsbp for mozilla and an empty string for IE.
1985
- * @param {boolean=} opt_dontFireDelayedChange True to make this content change
1986
- * not fire a delayed change event.
1987
- * @param {boolean=} opt_applyLorem Whether to apply lorem ipsum styles.
1988
- */
1989
- goog.editor.Field.prototype.setHtml = function(
1990
- addParas, html, opt_dontFireDelayedChange, opt_applyLorem) {
1991
- if (this.isLoading()) {
1992
- this.logger.severe("Can't set html while loading Trogedit");
1993
- return;
1994
- }
1995
-
1996
- // Clear the lorem ipsum style, always.
1997
- if (opt_applyLorem) {
1998
- this.execCommand(goog.editor.Command.CLEAR_LOREM);
1999
- }
2000
-
2001
- if (html && addParas) {
2002
- html = '<p>' + html + '</p>';
2003
- }
2004
-
2005
- // If we don't want change events to fire, we have to turn off change events
2006
- // before setting the field contents, since that causes mutation events.
2007
- if (opt_dontFireDelayedChange) {
2008
- this.stopChangeEvents(false, true);
2009
- }
2010
-
2011
- this.setInnerHtml_(html);
2012
-
2013
- // Set the lorem ipsum style, if the element is empty.
2014
- if (opt_applyLorem) {
2015
- this.execCommand(goog.editor.Command.UPDATE_LOREM);
2016
- }
2017
-
2018
- // TODO(user): This check should probably be moved to isEventStopped and
2019
- // startEvent.
2020
- if (this.isLoaded()) {
2021
- if (opt_dontFireDelayedChange) { // Turn back on change events
2022
- // We must fire change timer if necessary before restarting change events!
2023
- // Otherwise, the change timer firing after we restart events will cause
2024
- // the delayed change we were trying to stop. Flow:
2025
- // Stop delayed change
2026
- // setInnerHtml_, this starts the change timer
2027
- // start delayed change
2028
- // change timer fires
2029
- // starts delayed change timer since event was not stopped
2030
- // delayed change fires for the delayed change we tried to stop.
2031
- if (goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
2032
- this.changeTimerGecko_.fireIfActive();
2033
- }
2034
- this.startChangeEvents();
2035
- } else { // Mark the document as changed and fire change events.
2036
- this.dispatchChange();
2037
- }
2038
- }
2039
- };
2040
-
2041
-
2042
- /**
2043
- * Sets the inner HTML of the field. Works on both editable and
2044
- * uneditable fields.
2045
- * @param {?string} html The new inner HTML of the field.
2046
- * @private
2047
- */
2048
- goog.editor.Field.prototype.setInnerHtml_ = function(html) {
2049
- var field = this.getElement();
2050
- if (field) {
2051
- // Safari will put <style> tags into *new* <head> elements. When setting
2052
- // HTML, we need to remove these spare <head>s to make sure there's a
2053
- // clean slate, but keep the first <head>.
2054
- // Note: We punt on this issue for the non iframe case since
2055
- // we don't want to screw with the main document.
2056
- if (this.usesIframe() && goog.editor.BrowserFeature.MOVES_STYLE_TO_HEAD) {
2057
- var heads = field.ownerDocument.getElementsByTagName('HEAD');
2058
- for (var i = heads.length - 1; i >= 1; --i) {
2059
- heads[i].parentNode.removeChild(heads[i]);
2060
- }
2061
- }
2062
- } else {
2063
- field = this.getOriginalElement();
2064
- }
2065
-
2066
- if (field) {
2067
- this.injectContents(html, field);
2068
- }
2069
- };
2070
-
2071
-
2072
- /**
2073
- * Attemps to turn on designMode for a document. This function can fail under
2074
- * certain circumstances related to the load event, and will throw an exception.
2075
- * @protected
2076
- */
2077
- goog.editor.Field.prototype.turnOnDesignModeGecko = function() {
2078
- var doc = this.getEditableDomHelper().getDocument();
2079
-
2080
- // NOTE(nicksantos): This will fail under certain conditions, like
2081
- // when the node has display: none. It's up to clients to ensure that
2082
- // their fields are valid when they try to make them editable.
2083
- doc.designMode = 'on';
2084
-
2085
- if (goog.editor.BrowserFeature.HAS_STYLE_WITH_CSS) {
2086
- doc.execCommand('styleWithCSS', false, false);
2087
- }
2088
- };
2089
-
2090
-
2091
- /**
2092
- * Installs styles if needed. Only writes styles when they can't be written
2093
- * inline directly into the field.
2094
- * @protected
2095
- */
2096
- goog.editor.Field.prototype.installStyles = function() {
2097
- if (this.cssStyles && this.shouldLoadAsynchronously()) {
2098
- goog.style.installStyles(this.cssStyles, this.getElement());
2099
- }
2100
- };
2101
-
2102
-
2103
- /**
2104
- * Signal that the field is loaded and ready to use. Change events now are
2105
- * in effect.
2106
- * @private
2107
- */
2108
- goog.editor.Field.prototype.dispatchLoadEvent_ = function() {
2109
- var field = this.getElement();
2110
-
2111
- // Apply workaround className if necessary, see goog.editor.Field constructor
2112
- // for more details.
2113
- if (this.workaroundClassName_) {
2114
- goog.dom.classes.add(field, this.workaroundClassName_);
2115
- }
2116
-
2117
- this.installStyles();
2118
- this.startChangeEvents();
2119
- this.logger.info('Dispatching load ' + this.id);
2120
- this.dispatchEvent(goog.editor.Field.EventType.LOAD);
2121
- };
2122
-
2123
-
2124
- /**
2125
- * @return {boolean} Whether the field is uneditable.
2126
- */
2127
- goog.editor.Field.prototype.isUneditable = function() {
2128
- return this.loadState_ == goog.editor.Field.LoadState_.UNEDITABLE;
2129
- };
2130
-
2131
-
2132
- /**
2133
- * @return {boolean} Whether the field has finished loading.
2134
- */
2135
- goog.editor.Field.prototype.isLoaded = function() {
2136
- return this.loadState_ == goog.editor.Field.LoadState_.EDITABLE;
2137
- };
2138
-
2139
-
2140
- /**
2141
- * @return {boolean} Whether the field is in the process of loading.
2142
- */
2143
- goog.editor.Field.prototype.isLoading = function() {
2144
- return this.loadState_ == goog.editor.Field.LoadState_.LOADING;
2145
- };
2146
-
2147
-
2148
- /**
2149
- * Gives the field focus.
2150
- */
2151
- goog.editor.Field.prototype.focus = function() {
2152
- // TODO(user): This is actually the wrong codepath for focusing in WebKit
2153
- // (WebKit doesn't focus when you do this), but putting WebKit on the "right"
2154
- // codepath seems to cause test failures. We should figure out what's going on
2155
- // so focus can work in WebKit and all the tests can pass.
2156
- if (!goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE ||
2157
- goog.userAgent.WEBKIT) {
2158
- this.getEditableDomHelper().getWindow().focus();
2159
- } else {
2160
- if (goog.userAgent.OPERA) {
2161
- // Opera will scroll to the bottom of the focused document, even
2162
- // if it is contained in an iframe that is scrolled to the top and
2163
- // the bottom flows past the end of it. To prevent this,
2164
- // save the scroll position of the document containing the editor
2165
- // iframe, then restore it after the focus.
2166
- var scrollX = this.appWindow_.pageXOffset;
2167
- var scrollY = this.appWindow_.pageYOffset;
2168
- }
2169
- var element = this.getElement();
2170
- // Opera won't focus <body> in whitebox mode because we actually make
2171
- // <html> contentEditable instead to work around some visual issues.
2172
- // So we must focus <html> instead if <html> is the contentEditable
2173
- // element.
2174
- if (!goog.editor.BrowserFeature.FOCUSES_EDITABLE_BODY_ON_HTML_CLICK &&
2175
- element.parentNode.contentEditable) {
2176
- element = element.parentNode;
2177
- }
2178
- element.focus();
2179
- if (goog.userAgent.OPERA) {
2180
- this.appWindow_.scrollTo(
2181
- /** @type {number} */ (scrollX), /** @type {number} */ (scrollY));
2182
- }
2183
- }
2184
- };
2185
-
2186
-
2187
- /**
2188
- * Gives the field focus and places the cursor at the start of the field.
2189
- */
2190
- goog.editor.Field.prototype.focusAndPlaceCursorAtStart = function() {
2191
- // NOTE(user): Excluding Gecko to maintain existing behavior post refactoring
2192
- // placeCursorAtStart into its own method. In Gecko browsers that currently
2193
- // have a selection the existing selection will be restored, otherwise it
2194
- // will go to the start.
2195
- // TODO(user): Refactor the code using this and related methods. We should
2196
- // only mess with the selection in the case where there is not an existing
2197
- // selection in the field.
2198
- if (goog.editor.BrowserFeature.HAS_IE_RANGES || goog.userAgent.WEBKIT) {
2199
- this.placeCursorAtStart();
2200
- }
2201
- this.focus();
2202
- };
2203
-
2204
-
2205
- /**
2206
- * Place the cursor at the start of this field. It's recommended that you only
2207
- * use this method (and manipulate the selection in general) when there is not
2208
- * an existing selection in the field.
2209
- */
2210
- goog.editor.Field.prototype.placeCursorAtStart = function() {
2211
- var field = this.getElement();
2212
- if (field) {
2213
- var cursorPosition = goog.editor.node.getLeftMostLeaf(field);
2214
- if (field == cursorPosition) {
2215
- // The leftmost leaf we found was the field element itself (which likely
2216
- // means the field element is empty). We can't place the cursor next to
2217
- // the field element, so just place it at the beginning.
2218
- goog.dom.Range.createCaret(field, 0).select();
2219
- } else {
2220
- goog.editor.range.placeCursorNextTo(cursorPosition, true);
2221
- }
2222
- this.dispatchSelectionChangeEvent();
2223
- }
2224
- };
2225
-
2226
-
2227
- /**
2228
- * Makes a field editable.
2229
- *
2230
- * @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
2231
- */
2232
- goog.editor.Field.prototype.makeEditable = function(opt_iframeSrc) {
2233
- this.loadState_ = goog.editor.Field.LoadState_.LOADING;
2234
-
2235
- var field = this.getOriginalElement();
2236
-
2237
- // TODO: In the fieldObj, save the field's id, className, cssText
2238
- // in order to reset it on closeField. That way, we can muck with the field's
2239
- // css, id, class and restore to how it was at the end.
2240
- this.nodeName = field.nodeName;
2241
- this.savedClassName_ = field.className;
2242
- this.setInitialStyle(field.style.cssText);
2243
-
2244
- field.className += ' editable';
2245
-
2246
- this.makeEditableInternal(opt_iframeSrc);
2247
- };
2248
-
2249
-
2250
- /**
2251
- * Handles actually making something editable - creating necessary nodes,
2252
- * injecting content, etc.
2253
- * @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
2254
- * @protected
2255
- */
2256
- goog.editor.Field.prototype.makeEditableInternal = function(opt_iframeSrc) {
2257
- this.makeIframeField_(opt_iframeSrc);
2258
- };
2259
-
2260
-
2261
- /**
2262
- * Handle the loading of the field (e.g. once the field is ready to setup).
2263
- * TODO(user): this should probably just be moved into dispatchLoadEvent_.
2264
- * @protected
2265
- */
2266
- goog.editor.Field.prototype.handleFieldLoad = function() {
2267
- if (goog.userAgent.IE) {
2268
- // This must happen AFTER the browser has realized contentEditable is
2269
- // on. This does not work if it directly follows the setting of the
2270
- // contentEditable attribute. It seems that doing the getElemById
2271
- // above is enough to force IE to update its state.
2272
- goog.dom.Range.clearSelection(this.editableDomHelper.getWindow());
2273
- }
2274
-
2275
- if (goog.editor.Field.getActiveFieldId() != this.id) {
2276
- this.execCommand(goog.editor.Command.UPDATE_LOREM);
2277
- }
2278
-
2279
- this.setupChangeListeners_();
2280
- this.dispatchLoadEvent_();
2281
-
2282
- // Enabling plugins after we fire the load event so that clients have a
2283
- // chance to set initial field contents before we start mucking with
2284
- // everything.
2285
- for (var classId in this.plugins_) {
2286
- this.plugins_[classId].enable(this);
2287
- }
2288
- };
2289
-
2290
-
2291
- /**
2292
- * Closes the field and cancels all pending change timers. Note that this
2293
- * means that if a change event has not fired yet, it will not fire. Clients
2294
- * should check fieldOj.isModified() if they depend on the final change event.
2295
- * Throws an error if the field is already uneditable.
2296
- *
2297
- * @param {boolean=} opt_skipRestore True to prevent copying of editable field
2298
- * contents back into the original node.
2299
- */
2300
- goog.editor.Field.prototype.makeUneditable = function(opt_skipRestore) {
2301
- if (this.isUneditable()) {
2302
- throw Error('makeUneditable: Field is already uneditable');
2303
- }
2304
-
2305
- // Fire any events waiting on a timeout.
2306
- // Clearing delayed change also clears changeTimerGecko_.
2307
- this.clearDelayedChange();
2308
- this.selectionChangeTimer_.fireIfActive();
2309
- this.execCommand(goog.editor.Command.CLEAR_LOREM);
2310
-
2311
- var html = null;
2312
- if (!opt_skipRestore && this.getElement()) {
2313
- // Rest of cleanup is simpler if field was never initialized.
2314
- html = this.getCleanContents();
2315
- }
2316
-
2317
- // First clean up anything that happens in makeFieldEditable
2318
- // (i.e. anything that needs cleanup even if field has not loaded).
2319
- this.clearFieldLoadListener_();
2320
-
2321
- var field = this.getOriginalElement();
2322
- if (goog.editor.Field.getActiveFieldId() == field.id) {
2323
- goog.editor.Field.setActiveFieldId(null);
2324
- }
2325
-
2326
- // Clear all listeners before removing the nodes from the dom - if
2327
- // there are listeners on the iframe window, Firefox throws errors trying
2328
- // to unlisten once the iframe is no longer in the dom.
2329
- this.clearListeners_();
2330
-
2331
- // For fields that have loaded, clean up anything that happened in
2332
- // handleFieldOpen or later.
2333
- // If html is provided, copy it back and reset the properties on the field
2334
- // so that the original node will have the same properties as it did before
2335
- // it was made editable.
2336
- if (goog.isString(html)) {
2337
- field.innerHTML = html;
2338
- this.resetOriginalElemProperties();
2339
- }
2340
-
2341
- this.restoreDom();
2342
- this.tearDownFieldObject_();
2343
-
2344
- // On Safari, make sure to un-focus the field so that the
2345
- // native "current field" highlight style gets removed.
2346
- if (goog.userAgent.WEBKIT) {
2347
- field.blur();
2348
- }
2349
-
2350
- this.execCommand(goog.editor.Command.UPDATE_LOREM);
2351
- this.dispatchEvent(goog.editor.Field.EventType.UNLOAD);
2352
- };
2353
-
2354
-
2355
- /**
2356
- * Restores the dom to how it was before being made editable.
2357
- * @protected
2358
- */
2359
- goog.editor.Field.prototype.restoreDom = function() {
2360
- // TODO(user): Consider only removing the iframe if we are
2361
- // restoring the original node, aka, if opt_html.
2362
- var field = this.getOriginalElement();
2363
- // TODO(robbyw): Consider throwing an error if !field.
2364
- if (field) {
2365
- // If the field is in the process of loading when it starts getting torn
2366
- // up, the iframe will not exist.
2367
- var iframe = this.getEditableIframe();
2368
- if (iframe) {
2369
- goog.dom.replaceNode(field, iframe);
2370
- }
2371
- }
2372
- };
2373
-
2374
-
2375
- /**
2376
- * Returns true if the field needs to be loaded asynchrnously.
2377
- * @return {boolean} True if loads are async.
2378
- * @protected
2379
- */
2380
- goog.editor.Field.prototype.shouldLoadAsynchronously = function() {
2381
- if (!goog.isDef(this.isHttps_)) {
2382
- this.isHttps_ = false;
2383
-
2384
- if (goog.userAgent.IE && this.usesIframe()) {
2385
- // IE iframes need to load asynchronously if they are in https as we need
2386
- // to set an actual src on the iframe and wait for it to load.
2387
-
2388
- // Find the top-most window we have access to and see if it's https.
2389
- // Technically this could fail if we have an http frame in an https frame
2390
- // on the same domain (or vice versa), but walking up the window heirarchy
2391
- // to find the first window that has an http* protocol seems like
2392
- // overkill.
2393
- var win = this.originalDomHelper.getWindow();
2394
- while (win != win.parent) {
2395
- try {
2396
- win = win.parent;
2397
- } catch (e) {
2398
- break;
2399
- }
2400
- }
2401
- var loc = win.location;
2402
- this.isHttps_ = loc.protocol == 'https:' &&
2403
- loc.search.indexOf('nocheckhttps') == -1;
2404
- }
2405
- }
2406
- return this.isHttps_;
2407
- };
2408
-
2409
-
2410
- /**
2411
- * Start the editable iframe creation process for Mozilla or IE whitebox.
2412
- * The iframes load asynchronously.
2413
- *
2414
- * @param {string=} opt_iframeSrc URL to set the iframe src to if necessary.
2415
- * @private
2416
- */
2417
- goog.editor.Field.prototype.makeIframeField_ = function(opt_iframeSrc) {
2418
- var field = this.getOriginalElement();
2419
- // TODO(robbyw): Consider throwing an error if !field.
2420
- if (field) {
2421
- var html = field.innerHTML;
2422
-
2423
- // Invoke prepareContentsHtml on all plugins to prepare html for editing.
2424
- // Make sure this is done before calling this.attachFrame which removes the
2425
- // original element from DOM tree. Plugins may assume that the original
2426
- // element is still in its original position in DOM.
2427
- var styles = {};
2428
- html = this.reduceOp_(goog.editor.Plugin.Op.PREPARE_CONTENTS_HTML,
2429
- html, styles);
2430
-
2431
- var iframe = /** @type {HTMLIFrameElement} */(
2432
- this.originalDomHelper.createDom(goog.dom.TagName.IFRAME,
2433
- this.getIframeAttributes()));
2434
-
2435
- // TODO(nicksantos): Figure out if this is ever needed in SAFARI?
2436
- // In IE over HTTPS we need to wait for a load event before we set up the
2437
- // iframe, this is to prevent a security prompt or access is denied
2438
- // errors.
2439
- // NOTE(user): This hasn't been confirmed. isHttps_ allows a query
2440
- // param, nocheckhttps, which we can use to ascertain if this is actually
2441
- // needed. It was originally thought to be needed for IE6 SP1, but
2442
- // errors have been seen in IE7 as well.
2443
- if (this.shouldLoadAsynchronously()) {
2444
- // onLoad is the function to call once the iframe is ready to continue
2445
- // loading.
2446
- var onLoad = goog.bind(this.iframeFieldLoadHandler, this, iframe,
2447
- html, styles);
2448
-
2449
- this.fieldLoadListenerKey_ = goog.events.listen(iframe,
2450
- goog.events.EventType.LOAD, onLoad, true);
2451
-
2452
- if (opt_iframeSrc) {
2453
- iframe.src = opt_iframeSrc;
2454
- }
2455
- }
2456
-
2457
- this.attachIframe(iframe);
2458
-
2459
- // Only continue if its not IE HTTPS in which case we're waiting for load.
2460
- if (!this.shouldLoadAsynchronously()) {
2461
- this.iframeFieldLoadHandler(iframe, html, styles);
2462
- }
2463
- }
2464
- };
2465
-
2466
-
2467
- /**
2468
- * Given the original field element, and the iframe that is destined to
2469
- * become the editable field, styles them appropriately and add the iframe
2470
- * to the dom.
2471
- *
2472
- * @param {HTMLIFrameElement} iframe The iframe element.
2473
- * @protected
2474
- * @notypecheck
2475
- */
2476
- goog.editor.Field.prototype.attachIframe = function(iframe) {
2477
- var field = this.getOriginalElement();
2478
- // TODO(user): Why do we do these two lines .. and why whitebox only?
2479
- iframe.className = field.className;
2480
- iframe.id = field.id;
2481
- goog.dom.replaceNode(iframe, field);
2482
- };
2483
-
2484
-
2485
- /**
2486
- * @param {Object} extraStyles A map of extra styles.
2487
- * @return {goog.editor.icontent.FieldFormatInfo} The FieldFormatInfo object for
2488
- * this field's configuration.
2489
- * @protected
2490
- * @notypecheck
2491
- */
2492
- goog.editor.Field.prototype.getFieldFormatInfo = function(extraStyles) {
2493
- var originalElement = this.getOriginalElement();
2494
- var isStandardsMode = goog.editor.node.isStandardsMode(originalElement);
2495
-
2496
- return new goog.editor.icontent.FieldFormatInfo(
2497
- this.id,
2498
- isStandardsMode,
2499
- false,
2500
- false,
2501
- extraStyles);
2502
- };
2503
-
2504
-
2505
- /**
2506
- * Writes the html content into the iframe. Handles writing any aditional
2507
- * styling as well.
2508
- * @param {HTMLIFrameElement} iframe Iframe to write contents into.
2509
- * @param {string} innerHtml The html content to write into the iframe.
2510
- * @param {Object} extraStyles A map of extra style attributes.
2511
- * @protected
2512
- */
2513
- goog.editor.Field.prototype.writeIframeContent = function(
2514
- iframe, innerHtml, extraStyles) {
2515
- var formatInfo = this.getFieldFormatInfo(extraStyles);
2516
-
2517
- if (this.shouldLoadAsynchronously()) {
2518
- var doc = goog.dom.getFrameContentDocument(iframe);
2519
- goog.editor.icontent.writeHttpsInitialIframe(formatInfo, doc, innerHtml);
2520
- } else {
2521
- var styleInfo = new goog.editor.icontent.FieldStyleInfo(
2522
- this.getElement(), this.cssStyles);
2523
- goog.editor.icontent.writeNormalInitialIframe(formatInfo, innerHtml,
2524
- styleInfo, iframe);
2525
- }
2526
- };
2527
-
2528
-
2529
- /**
2530
- * The function to call when the editable iframe loads.
2531
- *
2532
- * @param {HTMLIFrameElement} iframe Iframe that just loaded.
2533
- * @param {string} innerHtml Html to put inside the body of the iframe.
2534
- * @param {Object} styles Property-value map of CSS styles to install on
2535
- * editable field.
2536
- * @protected
2537
- */
2538
- goog.editor.Field.prototype.iframeFieldLoadHandler = function(iframe,
2539
- innerHtml, styles) {
2540
- this.clearFieldLoadListener_();
2541
-
2542
- iframe.allowTransparency = 'true';
2543
- this.writeIframeContent(iframe, innerHtml, styles);
2544
- var doc = goog.dom.getFrameContentDocument(iframe);
2545
-
2546
- // Make sure to get this pointer after the doc.write as the doc.write
2547
- // clobbers all the document contents.
2548
- var body = doc.body;
2549
- this.setupFieldObject(body);
2550
-
2551
- if (!goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE) {
2552
- this.turnOnDesignModeGecko();
2553
- }
2554
-
2555
- this.handleFieldLoad();
2556
- };
2557
-
2558
-
2559
- /**
2560
- * Clears fieldLoadListener for a field. Must be called even (especially?) if
2561
- * the field is not yet loaded and therefore not in this.fieldMap_
2562
- * @private
2563
- */
2564
- goog.editor.Field.prototype.clearFieldLoadListener_ = function() {
2565
- if (this.fieldLoadListenerKey_) {
2566
- goog.events.unlistenByKey(this.fieldLoadListenerKey_);
2567
- this.fieldLoadListenerKey_ = null;
2568
- }
2569
- };
2570
-
2571
-
2572
- /**
2573
- * @return {Object} Get the HTML attributes for this field's iframe.
2574
- * @protected
2575
- */
2576
- goog.editor.Field.prototype.getIframeAttributes = function() {
2577
- var iframeStyle = 'padding:0;' + this.getOriginalElement().style.cssText;
2578
-
2579
- if (!goog.string.endsWith(iframeStyle, ';')) {
2580
- iframeStyle += ';';
2581
- }
2582
-
2583
- iframeStyle += 'background-color:white;';
2584
-
2585
- // Ensure that the iframe has default overflow styling. If overflow is
2586
- // set to auto, an IE rendering bug can occur when it tries to render a
2587
- // table at the very bottom of the field, such that the table would cause
2588
- // a scrollbar, that makes the entire field go blank.
2589
- if (goog.userAgent.IE) {
2590
- iframeStyle += 'overflow:visible;';
2591
- }
2592
-
2593
- return { 'frameBorder': 0, 'style': iframeStyle };
2594
- };