@qooxdoo/framework 7.0.0-beta → 7.0.0-beta.4

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 (224) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/Manifest.json +11 -8
  3. package/bin/deploy/qx +0 -0
  4. package/lib/compiler/compile-info.json +86 -96
  5. package/lib/compiler/index.js +35547 -47284
  6. package/{source/class/qx/tool/compiler/targets → lib/resource/qx/tool/cli/templates}/TypeScriptWriter-base_declaration.txt +0 -0
  7. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  8. package/lib/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  9. package/lib/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  10. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css +1 -1
  11. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -44
  12. package/lib/resource/qx/tool/cli/templates/template_vars.js +1 -1
  13. package/lib/resource/qx/tool/loadsass.js +13 -0
  14. package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  15. package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  16. package/lib/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  17. package/lib/resource/qx/tool/website/sass/qooxdoo.css +1 -1
  18. package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +1 -9
  19. package/package.json +14 -14
  20. package/source/class/qx/Annotation.js +2 -2
  21. package/source/class/qx/Class.js +20 -4
  22. package/source/class/qx/Interface.js +6 -0
  23. package/source/class/qx/Promise.js +32 -2
  24. package/source/class/qx/bom/Element.js +1 -0
  25. package/source/class/qx/bom/Font.js +17 -2
  26. package/source/class/qx/bom/Iframe.js +10 -5
  27. package/source/class/qx/bom/Label.js +2 -1
  28. package/source/class/qx/bom/Template.js +2 -0
  29. package/source/class/qx/bom/client/Browser.js +11 -2
  30. package/source/class/qx/bom/client/OperatingSystem.js +16 -0
  31. package/source/class/qx/bom/element/Decoration.js +8 -5
  32. package/source/class/qx/bom/element/Dimension.js +46 -0
  33. package/source/class/qx/bom/webfonts/WebFont.js +10 -0
  34. package/source/class/qx/core/BaseInit.js +9 -3
  35. package/source/class/qx/core/Environment.js +1 -0
  36. package/source/class/qx/core/Property.js +2 -2
  37. package/source/class/qx/data/SingleValueBinding.js +6 -3
  38. package/source/class/qx/data/controller/CheckedList.js +18 -9
  39. package/source/class/qx/data/controller/List.js +8 -0
  40. package/source/class/qx/dev/unit/Sinon.js +1 -1
  41. package/source/class/qx/event/Utils.js +1 -1
  42. package/source/class/qx/event/handler/DragDrop.js +1 -1
  43. package/source/class/qx/event/handler/Gesture.js +3 -1
  44. package/source/class/qx/event/handler/Mouse.js +61 -22
  45. package/source/class/qx/event/handler/Video.js +111 -0
  46. package/source/class/qx/html/Element.js +47 -32
  47. package/source/class/qx/html/Image.js +2 -2
  48. package/source/class/qx/html/Node.js +34 -4
  49. package/source/class/qx/lang/Json.js +1 -0
  50. package/source/class/qx/lang/String.js +53 -1
  51. package/source/class/qx/test/Annotation.js +2 -1
  52. package/source/class/qx/test/Promise.js +5 -3
  53. package/source/class/qx/test/bom/Font.js +10 -1
  54. package/source/class/qx/test/core/Property.js +5 -3
  55. package/source/class/qx/test/html/Element.js +3 -3
  56. package/source/class/qx/test/lang/String.js +28 -0
  57. package/source/class/qx/test/type/BaseString.js +7 -0
  58. package/source/class/qx/test/ui/embed/Iframe.js +1 -0
  59. package/source/class/qx/test/ui/form/ComboBox.js +0 -42
  60. package/source/class/qx/test/ui/virtual/performance/AbstractLayerTest.js +6 -2
  61. package/source/class/qx/theme/manager/Decoration.js +0 -0
  62. package/source/class/qx/theme/manager/Font.js +11 -0
  63. package/source/class/qx/theme/tangible/Appearance.js +10 -0
  64. package/source/class/qx/theme/tangible/ColorDark.js +0 -0
  65. package/source/class/qx/theme/tangible/Decoration.js +6 -0
  66. package/source/class/qx/tool/cli/Cli.js +5 -3
  67. package/source/class/qx/tool/cli/Watch.js +52 -0
  68. package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
  69. package/source/class/qx/tool/cli/api/CompilerApi.js +16 -6
  70. package/source/class/qx/tool/cli/api/LibraryApi.js +1 -1
  71. package/source/class/qx/tool/cli/commands/Command.js +7 -0
  72. package/source/class/qx/tool/cli/commands/Compile.js +28 -9
  73. package/source/class/qx/tool/cli/commands/Lint.js +30 -11
  74. package/source/class/qx/tool/cli/commands/Package.js +1 -2
  75. package/source/class/qx/tool/cli/commands/Run.js +2 -25
  76. package/source/class/qx/tool/cli/commands/Serve.js +9 -0
  77. package/source/class/qx/tool/cli/commands/package/Publish.js +19 -10
  78. package/source/class/qx/tool/compiler/Analyser.js +22 -23
  79. package/source/class/qx/tool/compiler/ClassFile.js +3 -2
  80. package/source/class/qx/tool/compiler/Console.js +17 -1
  81. package/source/class/qx/tool/compiler/Preprocess.js +1 -1
  82. package/source/class/qx/tool/compiler/app/Application.js +4 -2
  83. package/source/class/qx/tool/compiler/app/Cldr.js +1 -1
  84. package/source/class/qx/tool/compiler/app/Library.js +82 -88
  85. package/source/class/qx/tool/compiler/app/Part.js +1 -1
  86. package/source/class/qx/tool/compiler/app/Translation.js +1 -1
  87. package/source/class/qx/tool/compiler/app/WebFont.js +5 -4
  88. package/source/class/qx/tool/compiler/jsdoc/ChildControlParser.js +1 -1
  89. package/source/class/qx/tool/compiler/jsdoc/CommandParser.js +1 -1
  90. package/source/class/qx/tool/compiler/jsdoc/ParamParser.js +1 -1
  91. package/source/class/qx/tool/compiler/jsdoc/Parser.js +1 -1
  92. package/source/class/qx/tool/compiler/jsdoc/ReturnParser.js +1 -1
  93. package/source/class/qx/tool/compiler/jsdoc/ThrowsParser.js +1 -1
  94. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +1 -1
  95. package/source/class/qx/tool/compiler/makers/AppMaker.js +14 -14
  96. package/source/class/qx/tool/compiler/makers/Maker.js +1 -1
  97. package/source/class/qx/tool/compiler/resources/AbstractMatcher.js +1 -1
  98. package/source/class/qx/tool/compiler/resources/Asset.js +2 -2
  99. package/source/class/qx/tool/compiler/resources/ImageLoader.js +3 -2
  100. package/source/class/qx/tool/compiler/resources/Manager.js +5 -5
  101. package/source/class/qx/tool/compiler/resources/MetaLoader.js +1 -1
  102. package/source/class/qx/tool/compiler/resources/ResourceConverter.js +1 -1
  103. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +1 -1
  104. package/source/class/qx/tool/compiler/resources/ScssConverter.js +9 -3
  105. package/source/class/qx/tool/compiler/resources/ScssFile.js +13 -12
  106. package/source/class/qx/tool/compiler/resources/ScssIncludeConverter.js +1 -1
  107. package/source/class/qx/tool/compiler/targets/BuildTarget.js +1 -1
  108. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
  109. package/source/class/qx/tool/compiler/targets/SourceTarget.js +1 -1
  110. package/source/class/qx/tool/compiler/targets/Target.js +70 -32
  111. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +3 -4
  112. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +22 -0
  113. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +30 -0
  114. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +22 -0
  115. package/source/class/qx/tool/compiler/targets/meta/Javascript.js +22 -0
  116. package/source/class/qx/tool/compiler/targets/meta/Package.js +37 -2
  117. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +22 -0
  118. package/source/class/qx/tool/compiler/targets/meta/Part.js +22 -0
  119. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +29 -7
  120. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +23 -1
  121. package/source/class/qx/tool/config/Abstract.js +3 -3
  122. package/source/class/qx/tool/config/Utils.js +10 -1
  123. package/source/class/qx/tool/utils/IndexedArray.js +1 -1
  124. package/source/class/qx/tool/utils/Json.js +2 -2
  125. package/source/class/qx/tool/utils/LogManager.js +1 -1
  126. package/source/class/qx/tool/utils/Logger.js +1 -1
  127. package/source/class/qx/tool/utils/Promisify.js +1 -1
  128. package/source/class/qx/tool/utils/Utils.js +118 -1
  129. package/source/class/qx/tool/utils/Values.js +1 -1
  130. package/source/class/qx/tool/utils/Website.js +23 -18
  131. package/source/class/qx/tool/utils/files/FindFiles.js +1 -1
  132. package/source/class/qx/tool/utils/files/Utils.js +1 -1
  133. package/source/class/qx/tool/utils/json/Parser.js +1 -1
  134. package/source/class/qx/tool/utils/json/Stringify.js +1 -1
  135. package/source/class/qx/tool/utils/json/Tokenizer.js +1 -1
  136. package/source/class/qx/tool/utils/json/Writer.js +1 -1
  137. package/source/class/qx/type/BaseString.js +2 -1
  138. package/source/class/qx/ui/basic/Image.js +15 -7
  139. package/source/class/qx/ui/basic/Label.js +3 -1
  140. package/source/class/qx/ui/container/SlideBar.js +3 -0
  141. package/source/class/qx/ui/control/DateChooser.js +20 -1
  142. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -0
  143. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -0
  144. package/source/class/qx/ui/form/AbstractSelectBox.js +38 -6
  145. package/source/class/qx/ui/form/Button.js +3 -0
  146. package/source/class/qx/ui/form/CheckBox.js +25 -1
  147. package/source/class/qx/ui/form/CheckedList.js +2 -1
  148. package/source/class/qx/ui/form/ComboBox.js +36 -27
  149. package/source/class/qx/ui/form/List.js +3 -0
  150. package/source/class/qx/ui/form/MenuButton.js +24 -2
  151. package/source/class/qx/ui/form/RadioButton.js +7 -0
  152. package/source/class/qx/ui/form/RadioButtonGroup.js +3 -0
  153. package/source/class/qx/ui/form/RadioGroup.js +19 -0
  154. package/source/class/qx/ui/form/SelectBox.js +23 -1
  155. package/source/class/qx/ui/form/Slider.js +15 -0
  156. package/source/class/qx/ui/form/SplitButton.js +3 -0
  157. package/source/class/qx/ui/form/ToggleButton.js +8 -0
  158. package/source/class/qx/ui/menu/AbstractButton.js +24 -0
  159. package/source/class/qx/ui/menu/Button.js +3 -0
  160. package/source/class/qx/ui/menu/CheckBox.js +8 -0
  161. package/source/class/qx/ui/menu/Manager.js +2 -0
  162. package/source/class/qx/ui/menu/Menu.js +63 -1
  163. package/source/class/qx/ui/menu/RadioButton.js +10 -1
  164. package/source/class/qx/ui/menubar/Button.js +0 -27
  165. package/source/class/qx/ui/menubar/MenuBar.js +12 -0
  166. package/source/class/qx/ui/splitpane/Blocker.js +3 -0
  167. package/source/class/qx/ui/splitpane/HLayout.js +2 -2
  168. package/source/class/qx/ui/splitpane/Pane.js +4 -1
  169. package/source/class/qx/ui/splitpane/VLayout.js +2 -2
  170. package/source/class/qx/ui/table/Table.js +24 -2
  171. package/source/class/qx/ui/table/cellrenderer/Abstract.js +3 -1
  172. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +7 -3
  173. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +3 -0
  174. package/source/class/qx/ui/table/pane/Header.js +3 -0
  175. package/source/class/qx/ui/table/pane/Scroller.js +3 -7
  176. package/source/class/qx/ui/table/rowrenderer/Default.js +1 -1
  177. package/source/class/qx/ui/tabview/Page.js +26 -0
  178. package/source/class/qx/ui/tabview/TabView.js +3 -0
  179. package/source/class/qx/ui/toolbar/Button.js +2 -27
  180. package/source/class/qx/ui/toolbar/CheckBox.js +0 -27
  181. package/source/class/qx/ui/toolbar/RadioButton.js +21 -0
  182. package/source/class/qx/ui/toolbar/SplitButton.js +0 -28
  183. package/source/class/qx/ui/toolbar/ToolBar.js +3 -0
  184. package/source/class/qx/util/ColorUtil.js +2 -1
  185. package/source/class/qx/util/ResourceManager.js +16 -7
  186. package/source/class/qx/util/format/DateFormat.js +9 -0
  187. package/source/class/qxWeb.js +8 -4
  188. package/source/resource/qx/decoration/Indigo/font/JosefinSlab-SemiBold.ttf +0 -0
  189. package/source/resource/qx/decoration/Indigo/font/SIL Open Font License 1.1.txt +0 -0
  190. package/source/resource/qx/iconfont/MaterialIcons/fetch-fonts.sh +0 -0
  191. package/source/resource/qx/mobile/scss/common/_gradients.scss +3 -1
  192. package/source/resource/qx/mobile/scss/theme/indigo/_styles.scss +1 -1
  193. package/source/resource/qx/mobile/scss/ui/_carousel.scss +2 -2
  194. package/source/resource/qx/mobile/scss/ui/_checkbox.scss +3 -3
  195. package/source/resource/qx/mobile/scss/ui/_collapsible.scss +2 -2
  196. package/source/resource/qx/mobile/scss/ui/_picker.scss +4 -4
  197. package/source/resource/qx/mobile/scss/ui/_radiobutton.scss +4 -4
  198. package/source/resource/qx/mobile/scss/ui/_slider.scss +7 -7
  199. package/source/resource/qx/scss/_gradients.scss +3 -1
  200. package/source/resource/qx/scss/_mixins.scss +4 -2
  201. package/source/resource/qx/tool/bin/build-devtools +0 -0
  202. package/source/resource/qx/tool/bin/build-website +0 -0
  203. package/source/resource/qx/tool/bin/download-assets +0 -0
  204. package/source/resource/qx/tool/cli/templates/TypeScriptWriter-base_declaration.txt +13 -0
  205. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  206. package/source/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  207. package/source/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  208. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +1 -1
  209. package/source/resource/qx/tool/cli/templates/template_vars.js +1 -1
  210. package/source/resource/qx/tool/loadsass.js +13 -0
  211. package/source/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  212. package/source/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  213. package/source/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  214. package/source/resource/qx/website/scss/ui/_carousel.scss +2 -2
  215. package/lib/resource/qx/tool/website/.gitignore +0 -2
  216. package/source/class/qx/io/request/auth/.gitignore +0 -0
  217. package/source/class/qx/test/bom/client/.gitignore +0 -0
  218. package/source/class/qx/test/ui/control/.gitignore +0 -0
  219. package/source/class/qx/tool/compiler/Version.js +0 -20
  220. package/source/resource/qx/decoration/Modern/treevirtual/.gitignore +0 -0
  221. package/source/resource/qx/mobile/css/.gitignore +0 -3
  222. package/source/resource/qx/tool/website/.gitignore +0 -2
  223. package/source/resource/qx/website/.gitignore +0 -1
  224. package/source/resource/qx/website/scss/.gitignore +0 -1
@@ -53,7 +53,8 @@ qx.Class.define("qx.bom.Font",
53
53
  textDecoration: null,
54
54
  lineHeight: null,
55
55
  color: null,
56
- textShadow: null
56
+ textShadow: null,
57
+ letterSpacing: null
57
58
  };
58
59
 
59
60
  if (size !== undefined) {
@@ -152,7 +153,8 @@ qx.Class.define("qx.bom.Font",
152
153
  textDecoration: "",
153
154
  lineHeight: 1.2,
154
155
  color: "",
155
- textShadow: ""
156
+ textShadow: "",
157
+ letterSpacing: "",
156
158
  },
157
159
 
158
160
 
@@ -279,12 +281,20 @@ qx.Class.define("qx.bom.Font",
279
281
  check : "String",
280
282
  apply : "_applyTextShadow"
281
283
  },
284
+
282
285
  /** The weight property of the font as opposed to just setting it to 'bold' by setting the bold property to true */
283
286
  weight :
284
287
  {
285
288
  nullable : true,
286
289
  check : "String",
287
290
  apply : "_applyWeight"
291
+ },
292
+
293
+ /** The Letter Spacing (Unit: pixel) */
294
+ letterSpacing: {
295
+ check: "Integer",
296
+ nullable: true,
297
+ apply: "_applyLetterSpacing"
288
298
  }
289
299
  },
290
300
 
@@ -375,6 +385,11 @@ qx.Class.define("qx.bom.Font",
375
385
  this.__lookupMap.textShadow = value == null ? null : value;
376
386
  },
377
387
 
388
+ // property apply
389
+ _applyLetterSpacing: function (value, old) {
390
+ this.__lookupMap.letterSpacing = value === null ? null : value + "px";
391
+ },
392
+
378
393
 
379
394
  /**
380
395
  * Get a map of all CSS styles, which will be applied to the widget. Only
@@ -39,7 +39,6 @@ qx.Class.define("qx.bom.Iframe",
39
39
  */
40
40
  DEFAULT_ATTRIBUTES :
41
41
  {
42
- onload : "qx.event.handler.Iframe.onevent(this)",
43
42
  frameBorder: 0,
44
43
  frameSpacing: 0,
45
44
  marginWidth: 0,
@@ -66,14 +65,20 @@ qx.Class.define("qx.bom.Iframe",
66
65
  var attributes = attributes ? qx.lang.Object.clone(attributes) : {};
67
66
  var initValues = qx.bom.Iframe.DEFAULT_ATTRIBUTES;
68
67
 
69
- for (var key in initValues)
70
- {
71
- if (attributes[key] == null) {
68
+ for (var key in initValues) {
69
+ if (!(key in attributes)) {
72
70
  attributes[key] = initValues[key];
73
71
  }
74
72
  }
75
73
 
76
- return qx.dom.Element.create("iframe", attributes, win);
74
+ var elem = qx.dom.Element.create("iframe", attributes, win);
75
+ if (!("onload" in attributes)) {
76
+ elem.onload = function() {
77
+ qx.event.handler.Iframe.onevent(elem);
78
+ };
79
+ }
80
+ return elem;
81
+
77
82
  },
78
83
 
79
84
 
@@ -38,7 +38,8 @@ qx.Bootstrap.define("qx.bom.Label",
38
38
  fontWeight : 1,
39
39
  fontStyle : 1,
40
40
  lineHeight : 1,
41
- wordBreak : 1
41
+ wordBreak: 1,
42
+ letterSpacing : 1,
42
43
  },
43
44
 
44
45
 
@@ -155,6 +155,8 @@ qx.Bootstrap.define("qx.bom.Template", {
155
155
  }
156
156
  });
157
157
 
158
+ /*eslint curly: "off"*/
159
+
158
160
  (function() {
159
161
  // prevent using CommonJS exports object,
160
162
  // by shadowing global exports object
@@ -53,8 +53,17 @@ qx.Bootstrap.define("qx.bom.client.Browser",
53
53
  * @return {String} The name of the current browser.
54
54
  * @internal
55
55
  */
56
- getName : function() {
57
- var agent = navigator.userAgent;
56
+ getName() {
57
+ return qx.bom.client.Browser.detectName(navigator.userAgent);
58
+ },
59
+
60
+ /**
61
+ * Examines the user agent of the browser to determine the browser name
62
+ *
63
+ * @param agent {String} the user agent string
64
+ * @return {String} The name of the current browser.
65
+ */
66
+ detectName(agent) {
58
67
  var reg = new RegExp("(" + qx.bom.client.Browser.__agents + ")(/|)?([0-9]+\.[0-9])?");
59
68
  var match = agent.match(reg);
60
69
  if (!match) {
@@ -23,6 +23,7 @@
23
23
  * directly. Please check its class comment for details how to use it.
24
24
  *
25
25
  * @internal
26
+ * @ignore(process.*)
26
27
  */
27
28
  qx.Bootstrap.define("qx.bom.client.OperatingSystem",
28
29
  {
@@ -32,8 +33,23 @@ qx.Bootstrap.define("qx.bom.client.OperatingSystem",
32
33
  * Checks for the name of the operating system.
33
34
  * @return {String} The name of the operating system.
34
35
  * @internal
36
+ * @ignore(process.*)
37
+ *
35
38
  */
36
39
  getName : function() {
40
+ if (typeof process != "undefined" && process.platform) {
41
+ const MAP = {
42
+ "win32": "win",
43
+ "darwin": "osx",
44
+ "linux": "linux",
45
+ "aix": "unix",
46
+ "freebsd": "unix",
47
+ "openbsd": "unix",
48
+ "sunos": "unix",
49
+ "android": "android"
50
+ }
51
+ return MAP[process.platform]||"";
52
+ }
37
53
  if (!navigator) {
38
54
  return "";
39
55
  }
@@ -83,7 +83,14 @@ qx.Class.define("qx.bom.element.Decoration",
83
83
  {
84
84
  var tag = this.getTagName(repeat, source);
85
85
  if (tag != element.tagName.toLowerCase()) {
86
- throw new Error("Image modification not possible because elements could not be replaced at runtime anymore!");
86
+
87
+ // The "no-repeat" means that `getTagName` will suggest a `div` as opposed to an `img` tag, preferring to use
88
+ // `img` only for things that need scaling. The Desktop `qx.ui.*` will always follow this rule, but it
89
+ // is valid for virtual DOM (`qx.html.*`) to be used to create a no-repeat `img` tag. Ignore the validation
90
+ // for `no-repeat` `img`.
91
+ if (repeat != "no-repeat" || element.tagName.toLowerCase() != "img") {
92
+ throw new Error("Image modification not possible because elements could not be replaced at runtime anymore!");
93
+ }
87
94
  }
88
95
 
89
96
  var ret = this.getAttributes(source, repeat, style);
@@ -203,10 +210,6 @@ qx.Class.define("qx.bom.element.Decoration",
203
210
  style = {};
204
211
  }
205
212
 
206
- if (!style.position) {
207
- style.position = "absolute";
208
- }
209
-
210
213
  if ((qx.core.Environment.get("engine.name") == "mshtml"))
211
214
  {
212
215
  // Add a fix for small blocks where IE has a minHeight
@@ -83,6 +83,52 @@ qx.Bootstrap.define("qx.bom.element.Dimension",
83
83
  };
84
84
  },
85
85
 
86
+ /**
87
+ * Returns the outer height of the given element, including height, vertical padding, and vertical borders
88
+ *
89
+ * @param element {Element} element to query
90
+ * @param includeMargins {Boolean?} whether to include margins in teh
91
+ * @return {Integer} the height of the element
92
+ */
93
+ getOuterHeight(element, includeMargins) {
94
+ if (includeMargins) {
95
+ let marginTop = parseInt(document.defaultView.getComputedStyle(element, '').getPropertyValue('margin-top'), 10);
96
+ let marginBottom = parseInt(document.defaultView.getComputedStyle(element, '').getPropertyValue('margin-bottom'), 10);
97
+ return element.offsetHeight + marginTop + marginBottom;
98
+ }
99
+ return element.offsetHeight;
100
+ },
101
+
102
+ /**
103
+ * Returns the outer width of the given element, including height, vertical padding, and vertical borders
104
+ *
105
+ * @param element {Element} element to query
106
+ * @param includeMargins {Boolean?} whether to include margins in teh
107
+ * @return {Integer} the width of the element
108
+ */
109
+ getOuterWidth(element, includeMargins) {
110
+ if (includeMargins) {
111
+ let marginLeft = parseInt(document.defaultView.getComputedStyle(element, '').getPropertyValue('margin-left'), 10);
112
+ let marginRight = parseInt(document.defaultView.getComputedStyle(element, '').getPropertyValue('margin-right'), 10);
113
+ return element.offsetWidth + marginLeft + marginRight;
114
+ }
115
+ return element.offsetWidth;
116
+ },
117
+
118
+ /**
119
+ * Returns the outer size of the given element, including height, vertical padding, and vertical borders
120
+ *
121
+ * @param element {Element} element to query
122
+ * @param includeMargins {Boolean?} whether to include margins in teh
123
+ * @return {Map} map containing the width and height of the element
124
+ */
125
+ getOuterSize(element, includeMargins) {
126
+ return {
127
+ width: this.getOuterWidth(element, includeMargins),
128
+ height: this.getOuterHeight(element, includeMargins)
129
+ };
130
+ },
131
+
86
132
 
87
133
  /** @type {Map} Contains all overflow values where scrollbars are invisible */
88
134
  __hiddenScrollbars :
@@ -54,6 +54,15 @@ qx.Class.define("qx.bom.webfonts.WebFont", {
54
54
  {
55
55
  nullable : true,
56
56
  apply : "_applySources"
57
+ },
58
+
59
+ /**
60
+ * Indicates that the font has loaded successfully
61
+ */
62
+ valid: {
63
+ init: false,
64
+ check: "Boolean",
65
+ event: "changeValid"
57
66
  }
58
67
  },
59
68
 
@@ -93,6 +102,7 @@ qx.Class.define("qx.bom.webfonts.WebFont", {
93
102
  _onWebFontChangeStatus : function(ev)
94
103
  {
95
104
  var result = ev.getData();
105
+ this.setValid(!!result.valid);
96
106
  this.fireDataEvent("changeStatus", result);
97
107
  if (qx.core.Environment.get("qx.debug")) {
98
108
  if (result.valid === false) {
@@ -65,7 +65,9 @@ qx.Class.define("qx.core.BaseInit",
65
65
  qx.log.Logger.warn("Could not detect operating system!");
66
66
  }
67
67
 
68
- qx.log.Logger.debug(this, "Load runtime: " + (new Date - qx.Bootstrap.LOADSTART) + "ms");
68
+ if (qx.core.Environment.get("qx.debug.startupTimings")) {
69
+ qx.log.Logger.debug(this, "Load runtime: " + (new Date - qx.Bootstrap.LOADSTART) + "ms");
70
+ }
69
71
 
70
72
  var app = qx.core.Environment.get("qx.application");
71
73
  var clazz = qx.Class.getByName(app);
@@ -76,11 +78,15 @@ qx.Class.define("qx.core.BaseInit",
76
78
 
77
79
  var start = new Date;
78
80
  this.__application.main();
79
- qx.log.Logger.debug(this, "Main runtime: " + (new Date - start) + "ms");
81
+ if (qx.core.Environment.get("qx.debug.startupTimings")) {
82
+ qx.log.Logger.debug(this, "Main runtime: " + (new Date - start) + "ms");
83
+ }
80
84
 
81
85
  var start = new Date;
82
86
  this.__application.finalize();
83
- qx.log.Logger.debug(this, "Finalize runtime: " + (new Date - start) + "ms");
87
+ if (qx.core.Environment.get("qx.debug.startupTimings")) {
88
+ qx.log.Logger.debug(this, "Finalize runtime: " + (new Date - start) + "ms");
89
+ }
84
90
 
85
91
  qx.event.handler.Application.onAppInstanceInitialized();
86
92
  }
@@ -904,6 +904,7 @@ qx.Bootstrap.define("qx.core.Environment",
904
904
  "qx.blankpage": "qx/static/blank.html",
905
905
  "qx.debug.databinding": false,
906
906
  "qx.debug.dispose": false,
907
+ "qx.debug.startupTimings": false,
907
908
  // generator optimization vectors
908
909
  "qx.optimization.basecalls": false,
909
910
  "qx.optimization.comments": false,
@@ -1102,7 +1102,7 @@ qx.Bootstrap.define("qx.core.Property",
1102
1102
  if (qx.core.Environment.get("qx.promise") && (!config.check || config.check != "qx.Promise")) {
1103
1103
  code.push(
1104
1104
  'var promise;',
1105
- 'if (value instanceof qx.Promise || value instanceof Promise) ',
1105
+ 'if (qx.Promise.isPromise(value)) ',
1106
1106
  'promise = value.then(set.bind(this));',
1107
1107
  'else ',
1108
1108
  'promise = set.apply(this, arguments);');
@@ -1894,7 +1894,7 @@ qx.Bootstrap.define("qx.core.Property",
1894
1894
 
1895
1895
  if (qx.core.Environment.get("qx.promise")) {
1896
1896
  code.push(
1897
- "if(promise instanceof qx.Promise || promise instanceof Promise) " +
1897
+ "if(qx.Promise.isPromise(promise)) " +
1898
1898
  "return promise.then(fire); "
1899
1899
  );
1900
1900
  }
@@ -1344,12 +1344,15 @@ qx.Class.define("qx.data.SingleValueBinding",
1344
1344
  // get all bindings of object as target
1345
1345
  var targetBindings = this.__bindingsByTarget[hash];
1346
1346
 
1347
- if (!sourceBindings && !targetBindings)
1347
+ if (!sourceBindings && !targetBindings) {
1348
1348
  return [];
1349
- if (!sourceBindings)
1349
+ }
1350
+ if (!sourceBindings) {
1350
1351
  return qx.lang.Array.clone(targetBindings);
1351
- if (!targetBindings)
1352
+ }
1353
+ if (!targetBindings) {
1352
1354
  return qx.lang.Array.clone(sourceBindings);
1355
+ }
1353
1356
 
1354
1357
  return qx.lang.Array.unique(sourceBindings.concat(targetBindings));
1355
1358
  },
@@ -40,8 +40,9 @@ qx.Class.define("qx.data.controller.CheckedList", {
40
40
  construct(model, widget, path) {
41
41
  this.base(arguments, null, widget, path);
42
42
  this.setChecked(new qx.data.Array());
43
- if (model)
43
+ if (model) {
44
44
  this.setModel(model);
45
+ }
45
46
  },
46
47
 
47
48
  properties: {
@@ -101,10 +102,12 @@ qx.Class.define("qx.data.controller.CheckedList", {
101
102
 
102
103
  members: {
103
104
  _applyChecked(value, oldValue) {
104
- if (oldValue)
105
+ if (oldValue) {
105
106
  oldValue.removeListener("change", this.__onCheckedChange, this);
106
- if (value)
107
+ }
108
+ if (value) {
107
109
  value.addListener("change", this.__onCheckedChange, this);
110
+ }
108
111
  this._updateChecked();
109
112
  },
110
113
 
@@ -137,8 +140,9 @@ qx.Class.define("qx.data.controller.CheckedList", {
137
140
  */
138
141
  __onCheckedChange(evt) {
139
142
  let data = evt.getData();
140
- if (data.type == "order")
143
+ if (data.type == "order") {
141
144
  return;
145
+ }
142
146
  this._updateChecked();
143
147
  },
144
148
 
@@ -176,8 +180,9 @@ qx.Class.define("qx.data.controller.CheckedList", {
176
180
  _applyModel(value, oldValue) {
177
181
  if (!value || !value.getLength()) {
178
182
  let checked = this.getChecked();
179
- if (checked)
183
+ if (checked) {
180
184
  checked.removeAll();
185
+ }
181
186
  }
182
187
  this.base(arguments, value, oldValue);
183
188
  this._updateChecked();
@@ -208,18 +213,21 @@ qx.Class.define("qx.data.controller.CheckedList", {
208
213
  * Event handler for changes in the target widget's `checked` property
209
214
  */
210
215
  __onTargetCheckedChange(evt) {
211
- if (this.__inUpdateChecked)
216
+ if (this.__inUpdateChecked) {
212
217
  return;
218
+ }
213
219
  let target = this.getTarget();
214
220
  let replacement = [];
215
221
  target.getChecked().forEach(item => {
216
222
  let itemModel = item.getModel();
217
- if (itemModel)
223
+ if (itemModel) {
218
224
  replacement.push(itemModel);
225
+ }
219
226
  });
220
227
  let checked = this.getChecked();
221
- if (checked)
228
+ if (checked) {
222
229
  checked.replace(replacement);
230
+ }
223
231
  },
224
232
 
225
233
  /**
@@ -316,8 +324,9 @@ qx.Class.define("qx.data.controller.CheckedList", {
316
324
  if (itemModel) {
317
325
  let hash = itemModel.toHashCode();
318
326
  children[hash] = item;
319
- if (item.getValue())
327
+ if (item.getValue()) {
320
328
  toUncheck[hash] = item;
329
+ }
321
330
  }
322
331
  });
323
332
 
@@ -294,6 +294,10 @@ qx.Class.define("qx.data.controller.List",
294
294
  * @param old {Map|null} The old icon options.
295
295
  */
296
296
  _applyIconOptions: function(value, old) {
297
+ if (qx.core.Environment.get("qx.debug")) {
298
+ this.assertFalse(value && !qx.lang.Type.isObject(value), "expecting an object");
299
+ this.assertTrue(!!value.converter || !!value.onUpdate || !!value.onSetFail || !!value.ignoreConverter);
300
+ }
297
301
  this.__renewBindings();
298
302
  },
299
303
 
@@ -306,6 +310,10 @@ qx.Class.define("qx.data.controller.List",
306
310
  * @param old {Map|null} The old label options.
307
311
  */
308
312
  _applyLabelOptions: function(value, old) {
313
+ if (qx.core.Environment.get("qx.debug")) {
314
+ this.assertFalse(value && !qx.lang.Type.isObject(value), "expecting an object");
315
+ this.assertTrue(!!value.converter || !!value.onUpdate || !!value.onSetFail || !!value.ignoreConverter);
316
+ }
309
317
  this.__renewBindings();
310
318
  },
311
319
 
@@ -68,7 +68,7 @@ qx.Bootstrap.define("qx.dev.unit.Sinon",
68
68
  }
69
69
  });
70
70
 
71
-
71
+ /*eslint curly: "off"*/
72
72
  /**
73
73
  * @ignore(module, require, global, process.*, setImmediate)
74
74
  * @ignore(msSetImmediate)
@@ -303,7 +303,7 @@ qx.Class.define("qx.event.Utils", {
303
303
  var tracker = {};
304
304
  for (var index = 0; index < arr.length; index++) {
305
305
  var result = fn(arr[index], index);
306
- if (result instanceof qx.Promise) {
306
+ if (qx.Promise.isPromise(result)) {
307
307
  for (++index; index < arr.length; index++) {
308
308
  (function(item, index) {
309
309
  result = result.then(function() {
@@ -494,7 +494,7 @@ qx.Class.define("qx.event.handler.DragDrop",
494
494
  });
495
495
  } else {
496
496
  if (qx.core.Environment.get("qx.debug")) {
497
- if (result instanceof qx.Promise) {
497
+ if (qx.Promise.isPromise(result)) {
498
498
  this.error("DragDrop event \"" + type + "\" returned a promise but a synchronous event was required, drag and drop may not work as expected (consider using getDataAsync)");
499
499
  }
500
500
  }
@@ -229,6 +229,8 @@ qx.Class.define("qx.event.handler.Gesture",
229
229
 
230
230
  defer : function(statics) {
231
231
  qx.event.Registration.addHandler(statics);
232
- qx.event.Registration.getManager(document).getHandler(statics);
232
+ qx.event.Registration.addListener(window, "appinitialized", () => {
233
+ qx.event.Registration.getManager(document).getHandler(statics);
234
+ });
233
235
  }
234
236
  });
@@ -56,6 +56,7 @@ qx.Class.define("qx.event.handler.Mouse",
56
56
  this.__manager = manager;
57
57
  this.__window = manager.getWindow();
58
58
  this.__root = this.__window.document;
59
+ this.__onNativeListener = qx.lang.Function.listener(this._onNative, this);
59
60
 
60
61
  // Initialize observers
61
62
  this._initButtonObserver();
@@ -80,18 +81,27 @@ qx.Class.define("qx.event.handler.Mouse",
80
81
  /** @type {Map} Supported event types */
81
82
  SUPPORTED_TYPES :
82
83
  {
84
+ auxclick : 1,
85
+ click : 1,
86
+ contextmenu : 1,
87
+ dblclick : 1,
88
+ mousedown : 1,
89
+ mouseenter : 1,
90
+ mouseleave : 1,
83
91
  mousemove : 1,
84
- mouseover : 1,
85
92
  mouseout : 1,
86
- mousedown : 1,
93
+ mouseover : 1,
87
94
  mouseup : 1,
88
- click : 1,
89
- auxclick : 1,
90
- dblclick : 1,
91
- contextmenu : 1,
92
95
  mousewheel : 1
93
96
  },
94
97
 
98
+ /** @type{Map} these event types cannot be attached to the root (the document), they must be attached to the element itself */
99
+ NON_BUBBLING_EVENTS:
100
+ {
101
+ mouseenter: true,
102
+ mouseleave: true
103
+ },
104
+
95
105
  /** @type {Integer} Which target check to use */
96
106
  TARGET_CHECK : qx.event.IEventHandler.TARGET_DOMNODE + qx.event.IEventHandler.TARGET_DOCUMENT + qx.event.IEventHandler.TARGET_WINDOW,
97
107
 
@@ -121,6 +131,9 @@ qx.Class.define("qx.event.handler.Mouse",
121
131
  __root : null,
122
132
  __preventNextClick: null,
123
133
 
134
+ /** @type{Function} wrapper for `_onNative`, bound as a native listener */
135
+ __onNativeListener: null,
136
+
124
137
 
125
138
 
126
139
  /*
@@ -133,24 +146,51 @@ qx.Class.define("qx.event.handler.Mouse",
133
146
  canHandleEvent : function(target, type) {},
134
147
 
135
148
 
136
- // interface implementation
137
- // The iPhone requires for attaching mouse events natively to every element which
138
- // should react on mouse events. As of version 3.0 it also requires to keep the
139
- // listeners as long as the event should work. In 2.0 it was enough to attach the
140
- // listener once.
141
- registerEvent : qx.core.Environment.get("os.name") === "ios" ?
142
- function(target, type, capture) {
149
+ /**
150
+ * @Override
151
+ */
152
+ registerEvent(target, type, capture) {
153
+ if (qx.event.handler.Mouse.NON_BUBBLING_EVENTS[type]) {
154
+ qx.bom.Event.addNativeListener(target, type, this.__onNativeListener);
155
+
156
+ } else if (qx.core.Environment.get("os.name") === "ios") {
157
+ // The iPhone requires for attaching mouse events natively to every element which
158
+ // should react on mouse events. As of version 3.0 it also requires to keep the
159
+ // listeners as long as the event should work. In 2.0 it was enough to attach the
160
+ // listener once.
143
161
  target["on" + type] = (function() {return null;});
144
- } : (function() {return null;}),
145
-
162
+ }
163
+ },
146
164
 
147
- // interface implementation
148
- unregisterEvent : qx.core.Environment.get("os.name") === "ios" ?
149
- function(target, type, capture) {
165
+ /**
166
+ * @Override
167
+ */
168
+ unregisterEvent(target, type, capture) {
169
+ if (qx.event.handler.Mouse.NON_BUBBLING_EVENTS[type]) {
170
+ qx.bom.Event.removeNativeListener(target, type, this.__onNativeListener);
171
+
172
+ } else if (qx.core.Environment.get("os.name") === "ios") {
150
173
  target["on" + type] = undefined;
151
- } : (function() {return null;}),
152
-
174
+ }
175
+ },
153
176
 
177
+ /**
178
+ * Default event handler for events that do not bubble
179
+ *
180
+ * @signature function(domEvent, eventId)
181
+ * @param domEvent {Event} Native event
182
+ */
183
+ _onNative: qx.event.GlobalError.observeMethod(function(domEvent) {
184
+ let target = qx.bom.Event.getTarget(domEvent);
185
+
186
+ qx.event.Registration.fireNonBubblingEvent(
187
+ target,
188
+ domEvent.type,
189
+ qx.event.type.Mouse,
190
+ [domEvent, target, undefined, undefined, domEvent.cancelable]
191
+ );
192
+ }),
193
+
154
194
 
155
195
 
156
196
  /*
@@ -237,10 +277,9 @@ qx.Class.define("qx.event.handler.Mouse",
237
277
  this.__onMoveEventWrapper = qx.lang.Function.listener(this._onMoveEvent, this);
238
278
 
239
279
  var Event = qx.bom.Event;
240
-
241
280
  Event.addNativeListener(this.__root, "mousemove", this.__onMoveEventWrapper);
242
- Event.addNativeListener(this.__root, "mouseover", this.__onMoveEventWrapper);
243
281
  Event.addNativeListener(this.__root, "mouseout", this.__onMoveEventWrapper);
282
+ Event.addNativeListener(this.__root, "mouseover", this.__onMoveEventWrapper);
244
283
  },
245
284
 
246
285