@breakside/jskit 2023.10.0 → 2023.12.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.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSFileManager+HTML.js +110 -48
- package/Frameworks/Foundation.jsframework/JS/JSFileManager+Node.js +8 -1
- package/Frameworks/Foundation.jsframework/JS/JSUserDefaults.js +0 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSFileManager+HTML.js +110 -48
- package/Root/Frameworks/Foundation/JSFileManager+Node.js +8 -1
- package/Root/Frameworks/Foundation/JSUserDefaults.js +0 -1
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIAccessibility.js +2 -1
- package/Root/Frameworks/UIKit/UICollectionReusableView.js +1 -0
- package/Root/Frameworks/UIKit/UICollectionViewGridLayout.js +2 -11
- package/Root/Frameworks/UIKit/UICollectionViewLayout.js +1 -0
- package/Root/Frameworks/UIKit/UIHTMLDisplayServerCanvasContext.js +6 -1
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +18 -2
- package/Root/Frameworks/UIKit/UILayer.js +66 -4
- package/Root/Frameworks/UIKit/UIScreen.js +5 -1
- package/Root/Frameworks/UIKit/UITextLayer.js +1 -1
- package/Root/Frameworks/UIKit/UIView.js +27 -4
- package/Root/Frameworks/UIKit/UIWindow.js +12 -4
- package/Root/Frameworks/UIKit/UIWindowServer.js +2 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -58,6 +58,7 @@ JSClass("UICollectionReusableView", UIView, {
|
|
|
58
58
|
applyAttributes: function(attributes){
|
|
59
59
|
this.untransformedFrame = attributes.frame;
|
|
60
60
|
this.transform = attributes.transform;
|
|
61
|
+
this.zIndex = attributes.zIndex;
|
|
61
62
|
if (!attributes.indexPath.isEqual(this.indexPath)){
|
|
62
63
|
this.indexPath = JSIndexPath(attributes.indexPath);
|
|
63
64
|
}
|
|
@@ -345,17 +345,6 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
|
|
|
345
345
|
if (this._cachedLayout.footerFrame.size.height > 0 && rect.intersectsRect(this._cachedLayout.footerFrame)){
|
|
346
346
|
attributes.push(this.layoutAttributesForSupplimentaryViewAtIndexPath(JSIndexPath([]), UICollectionViewGridLayout.SupplimentaryKind.footer));
|
|
347
347
|
}
|
|
348
|
-
if (this._headersStickToTop){
|
|
349
|
-
var i = attributes.length - 1;
|
|
350
|
-
var j = i;
|
|
351
|
-
for (; i >= 0; --i){
|
|
352
|
-
attrs = attributes[i];
|
|
353
|
-
if (attrs.elementCategory === UICollectionView.ElementCategory.supplimentary && attrs.kind === UICollectionViewGridLayout.SupplimentaryKind.header){
|
|
354
|
-
attributes.splice(i, 1);
|
|
355
|
-
attributes.splice(j, 0, attrs);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
348
|
return attributes;
|
|
360
349
|
},
|
|
361
350
|
|
|
@@ -387,6 +376,7 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
|
|
|
387
376
|
if (this._headersStickToTop){
|
|
388
377
|
ty = Math.max(0, this.collectionView.contentView.bounds.origin.y - attributes.frame.origin.y);
|
|
389
378
|
attributes.transform = JSAffineTransform.Translated(0, ty);
|
|
379
|
+
attributes.zIndex = 2;
|
|
390
380
|
}
|
|
391
381
|
return attributes;
|
|
392
382
|
}
|
|
@@ -405,6 +395,7 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
|
|
|
405
395
|
if (this._headersStickToTop){
|
|
406
396
|
ty = Math.min(Math.max(0, this.collectionView.contentView.bounds.origin.y - attributes.frame.origin.y + this._cachedLayout.headerFrame.size.height), (sectionLayout.frame.origin.y + sectionLayout.frame.size.height) - (sectionLayout.headerFrame.origin.y + sectionLayout.headerFrame.size.height));
|
|
407
397
|
attributes.transform = JSAffineTransform.Translated(0, ty);
|
|
398
|
+
attributes.zIndex = 1;
|
|
408
399
|
}
|
|
409
400
|
return attributes;
|
|
410
401
|
}
|
|
@@ -56,7 +56,8 @@ JSClass("UIHTMLDisplayServerCanvasContext", UIHTMLDisplayServerContext, {
|
|
|
56
56
|
cornerRadius: true,
|
|
57
57
|
shadow: true,
|
|
58
58
|
contentVisualEffect: true,
|
|
59
|
-
backgroundVisualEffect: true
|
|
59
|
+
backgroundVisualEffect: true,
|
|
60
|
+
zIndex: true,
|
|
60
61
|
};
|
|
61
62
|
this._imageElements = [];
|
|
62
63
|
this._canvasElements = [];
|
|
@@ -377,6 +378,10 @@ JSClass("UIHTMLDisplayServerCanvasContext", UIHTMLDisplayServerContext, {
|
|
|
377
378
|
this.style.filter = layer.presentation.contentVisualEffect ? layer.presentation.contentVisualEffect.cssFilterString() : '';
|
|
378
379
|
},
|
|
379
380
|
|
|
381
|
+
updateHTMLProperty_zIndex: function(layer){
|
|
382
|
+
this.style.zIndex = layer.zIndex;
|
|
383
|
+
},
|
|
384
|
+
|
|
380
385
|
// --------------------------------------------------------------------
|
|
381
386
|
// MARK: - Managing Canvas Elements & Context
|
|
382
387
|
|
|
@@ -857,6 +857,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
857
857
|
UIHTMLWindowServer.$super.orderWindowFront.call(this, window);
|
|
858
858
|
if (window.subviewIndex === 0){
|
|
859
859
|
this.updateThemeColorElement();
|
|
860
|
+
this.updateDocumentTitle();
|
|
860
861
|
}
|
|
861
862
|
},
|
|
862
863
|
|
|
@@ -868,6 +869,9 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
868
869
|
this.updateThemeColorElement();
|
|
869
870
|
},
|
|
870
871
|
|
|
872
|
+
// --------------------------------------------------------------------
|
|
873
|
+
// MARK: - HTML Document/Window
|
|
874
|
+
|
|
871
875
|
updateThemeColorElement: function(){
|
|
872
876
|
if (this.themeColorElement === null){
|
|
873
877
|
return;
|
|
@@ -896,6 +900,15 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
896
900
|
this.themeColorElement.setAttribute("content", color.cssString());
|
|
897
901
|
},
|
|
898
902
|
|
|
903
|
+
updateDocumentTitle: function(){
|
|
904
|
+
var window = this.windowStack[0];
|
|
905
|
+
if (window instanceof UIRootWindow){
|
|
906
|
+
if (this.rootElement === this.domDocument.body){
|
|
907
|
+
this.domDocument.title = window.title;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
|
|
899
912
|
// --------------------------------------------------------------------
|
|
900
913
|
// MARK: - Screen Updates
|
|
901
914
|
|
|
@@ -921,7 +934,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
921
934
|
this.accessibilityObservers = {};
|
|
922
935
|
this.accessibilityObservers.elementCreated = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.elementCreated, null, this.handleAccessibilityElementCreated, this);
|
|
923
936
|
this.accessibilityObservers.elementChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.elementChanged, null, this.handleAccessibilityElementChanged, this);
|
|
924
|
-
this.accessibilityObservers.
|
|
937
|
+
this.accessibilityObservers.labelChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.labelChanged, null, this.handleAccessibilityLabelChanged, this);
|
|
925
938
|
this.accessibilityObservers.valueChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.valueChanged, null, this.handleAccessibilityValueChanged, this);
|
|
926
939
|
this.accessibilityObservers.visibilityChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.visibilityChanged, null, this.handleAccessibilityVisibilityChanged, this);
|
|
927
940
|
this.accessibilityObservers.enabledChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.enabledChanged, null, this.handleAccessibilityEnabledChanged, this);
|
|
@@ -977,12 +990,15 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
977
990
|
}
|
|
978
991
|
},
|
|
979
992
|
|
|
980
|
-
|
|
993
|
+
handleAccessibilityLabelChanged: function(notification){
|
|
981
994
|
var element = notification.sender;
|
|
982
995
|
var context = this.contextForAccessibilityElement(element);
|
|
983
996
|
if (context !== null){
|
|
984
997
|
context.updateAccessibilityLabel(element);
|
|
985
998
|
}
|
|
999
|
+
if (element instanceof UIRootWindow){
|
|
1000
|
+
this.updateDocumentTitle();
|
|
1001
|
+
}
|
|
986
1002
|
},
|
|
987
1003
|
|
|
988
1004
|
handleAccessibilityValueChanged: function(notification){
|
|
@@ -80,6 +80,7 @@ JSClass("UILayer", JSObject, {
|
|
|
80
80
|
shadowOffset: UILayerAnimatedProperty(),
|
|
81
81
|
shadowRadius: UILayerAnimatedProperty(),
|
|
82
82
|
clipsToBounds: JSDynamicProperty('_clipsToBounds', false),
|
|
83
|
+
zIndex: JSDynamicProperty("_zIndex", 0),
|
|
83
84
|
model: null,
|
|
84
85
|
presentation: null,
|
|
85
86
|
superlayer: null,
|
|
@@ -300,6 +301,34 @@ JSClass("UILayer", JSObject, {
|
|
|
300
301
|
return path;
|
|
301
302
|
},
|
|
302
303
|
|
|
304
|
+
setZIndex: function(zIndex){
|
|
305
|
+
if (zIndex !== this._zIndex){
|
|
306
|
+
var previousZIndex = this._zIndex;
|
|
307
|
+
this._zIndex = zIndex;
|
|
308
|
+
this.didChangeProperty('zIndex');
|
|
309
|
+
if (this.superlayer !== null){
|
|
310
|
+
if (previousZIndex === 0){
|
|
311
|
+
this.superlayer.numberOfSublayersWithNonZeroZIndex += 1;
|
|
312
|
+
}else{
|
|
313
|
+
if (zIndex === 0){
|
|
314
|
+
this.superlayer.numberOfSublayersWithNonZeroZIndex -= 1;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
this.superlayer.setNeedsZIndexOrderedSublayers();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
numberOfSublayersWithNonZeroZIndex: 0,
|
|
323
|
+
zIndexOrderedSublayers: null,
|
|
324
|
+
|
|
325
|
+
setNeedsZIndexOrderedSublayers: function(){
|
|
326
|
+
this.zIndexOrderedSublayers = null;
|
|
327
|
+
if (this.delegate && this.delegate.layerDidChangeZIndexSublayers){
|
|
328
|
+
this.delegate.layerDidChangeZIndexSublayers(this);
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
|
|
303
332
|
// -------------------------------------------------------------------------
|
|
304
333
|
// MARK: - Shadows
|
|
305
334
|
|
|
@@ -340,6 +369,12 @@ JSClass("UILayer", JSObject, {
|
|
|
340
369
|
}
|
|
341
370
|
}
|
|
342
371
|
this.sublayers.splice(index, 0, sublayer);
|
|
372
|
+
if (sublayer.zIndex !== 0){
|
|
373
|
+
this.numberOfSublayersWithNonZeroZIndex += 1;
|
|
374
|
+
this.setNeedsZIndexOrderedSublayers();
|
|
375
|
+
}else if (this.numberOfSublayersWithNonZeroZIndex > 0){
|
|
376
|
+
this.setNeedsZIndexOrderedSublayers();
|
|
377
|
+
}
|
|
343
378
|
sublayer.sublayerIndex = index;
|
|
344
379
|
for (i = sublayer.sublayerIndex + 1, l = this.sublayers.length; i < l; ++i){
|
|
345
380
|
this.sublayers[i].sublayerIndex += 1;
|
|
@@ -374,6 +409,12 @@ JSClass("UILayer", JSObject, {
|
|
|
374
409
|
for (var i = sublayer.sublayerIndex + 1, l = this.sublayers.length; i < l; ++i){
|
|
375
410
|
this.sublayers[i].sublayerIndex -= 1;
|
|
376
411
|
}
|
|
412
|
+
if (this.numberOfSublayersWithNonZeroZIndex > 0){
|
|
413
|
+
this.setNeedsZIndexOrderedSublayers();
|
|
414
|
+
}
|
|
415
|
+
if (sublayer.zIndex !== 0){
|
|
416
|
+
this.numberOfSublayersWithNonZeroZIndex -= 1;
|
|
417
|
+
}
|
|
377
418
|
this.sublayers.splice(sublayer.sublayerIndex,1);
|
|
378
419
|
sublayer.superlayer = null;
|
|
379
420
|
sublayer.sublayerIndex = null;
|
|
@@ -540,8 +581,16 @@ JSClass("UILayer", JSObject, {
|
|
|
540
581
|
var sublayer;
|
|
541
582
|
var locationInSublayer;
|
|
542
583
|
var hit = null;
|
|
543
|
-
|
|
544
|
-
|
|
584
|
+
var sublayers = this.sublayers;
|
|
585
|
+
if (this.numberOfSublayersWithNonZeroZIndex > 0){
|
|
586
|
+
if (this.zIndexOrderedSublayers === null){
|
|
587
|
+
this.zIndexOrderedSublayers = JSCopy(sublayers);
|
|
588
|
+
this.zIndexOrderedSublayers.sort(UILayer.compareZIndex);
|
|
589
|
+
}
|
|
590
|
+
sublayers = this.zIndexOrderedSublayers;
|
|
591
|
+
}
|
|
592
|
+
for (var i = sublayers.length - 1; i >= 0 && hit === null; --i){
|
|
593
|
+
sublayer = sublayers[i];
|
|
545
594
|
locationInSublayer = this.convertPointToLayer(locationInLayer, sublayer);
|
|
546
595
|
if (!sublayer.hidden && sublayer.presentation.alpha > 0 && (!sublayer.clipsToBounds || sublayer.containsPoint(locationInSublayer))){
|
|
547
596
|
hit = sublayer.hitTest(locationInSublayer);
|
|
@@ -796,8 +845,17 @@ JSClass("UILayer", JSObject, {
|
|
|
796
845
|
if (includeSublayers && !hidden){
|
|
797
846
|
var sublayer;
|
|
798
847
|
var transform;
|
|
799
|
-
|
|
800
|
-
|
|
848
|
+
var sublayers = this.sublayers;
|
|
849
|
+
if (this.numberOfSublayersWithNonZeroZIndex > 0){
|
|
850
|
+
if (this.zIndexOrderedSublayers === null){
|
|
851
|
+
this.zIndexOrderedSublayers = JSCopy(sublayers);
|
|
852
|
+
this.zIndexOrderedSublayers.sort(UILayer.compareZIndex);
|
|
853
|
+
}
|
|
854
|
+
sublayers = this.zIndexOrderedSublayers;
|
|
855
|
+
}
|
|
856
|
+
sublayers.sort(function(a, b){ return a._zIndex - b._zIndex; });
|
|
857
|
+
for (var i = 0, l = sublayers.length; i < l; ++i){
|
|
858
|
+
sublayer = sublayers[i];
|
|
801
859
|
if (!sublayer.hidden){
|
|
802
860
|
context.save();
|
|
803
861
|
transform = sublayer._presentationTransformFromSuperlayer();
|
|
@@ -842,6 +900,10 @@ UILayer.Path = {
|
|
|
842
900
|
shadow: 2
|
|
843
901
|
};
|
|
844
902
|
|
|
903
|
+
UILayer.compareZIndex = function(a, b){
|
|
904
|
+
return a._zIndex - b._zIndex;
|
|
905
|
+
};
|
|
906
|
+
|
|
845
907
|
JSContext.definePropertiesFromExtensions({
|
|
846
908
|
|
|
847
909
|
drawsHiddenLayers: false,
|
|
@@ -138,6 +138,9 @@ JSClass('UIView', UIResponder, {
|
|
|
138
138
|
if (spec.containsKey("tag")){
|
|
139
139
|
this.tag = spec.valueForKey("tag");
|
|
140
140
|
}
|
|
141
|
+
if (spec.containsKey("zIndex")){
|
|
142
|
+
this.zIndex = spec.valueForKey("zIndex", Number);
|
|
143
|
+
}
|
|
141
144
|
var i, l;
|
|
142
145
|
if (spec.containsKey("gestureRecognizers")){
|
|
143
146
|
var recognizers = spec.valueForKey("gestureRecognizers");
|
|
@@ -193,6 +196,7 @@ JSClass('UIView', UIResponder, {
|
|
|
193
196
|
shadowOffset: UIViewLayerProperty(),
|
|
194
197
|
shadowRadius: UIViewLayerProperty(),
|
|
195
198
|
contentVisualEffect: UIViewLayerProperty(),
|
|
199
|
+
zIndex: UIViewLayerProperty(),
|
|
196
200
|
cursor: JSDynamicProperty(),
|
|
197
201
|
tooltip: null,
|
|
198
202
|
|
|
@@ -207,6 +211,10 @@ JSClass('UIView', UIResponder, {
|
|
|
207
211
|
}
|
|
208
212
|
},
|
|
209
213
|
|
|
214
|
+
layerDidChangeZIndexSublayers: function(layer){
|
|
215
|
+
this.zIndexOrderedSubviews = null;
|
|
216
|
+
},
|
|
217
|
+
|
|
210
218
|
// -------------------------------------------------------------------------
|
|
211
219
|
// MARK: - Superview
|
|
212
220
|
|
|
@@ -967,6 +975,8 @@ JSClass('UIView', UIResponder, {
|
|
|
967
975
|
|
|
968
976
|
userInteractionEnabled: true,
|
|
969
977
|
|
|
978
|
+
zIndexOrderedSubviews: null,
|
|
979
|
+
|
|
970
980
|
containsPoint: function(point){
|
|
971
981
|
return this.layer.containsPoint(point);
|
|
972
982
|
},
|
|
@@ -975,11 +985,19 @@ JSClass('UIView', UIResponder, {
|
|
|
975
985
|
var subview;
|
|
976
986
|
var locationInSubview;
|
|
977
987
|
var hit = null;
|
|
978
|
-
|
|
979
|
-
|
|
988
|
+
var subviews = this.subviews;
|
|
989
|
+
if (this.layer.numberOfSublayersWithNonZeroZIndex > 0){
|
|
990
|
+
if (this.zIndexOrderedSubviews === null){
|
|
991
|
+
this.zIndexOrderedSubviews = JSCopy(subviews);
|
|
992
|
+
this.zIndexOrderedSubviews.sort(UIView.compareZIndex);
|
|
993
|
+
}
|
|
994
|
+
subviews = this.zIndexOrderedSubviews;
|
|
995
|
+
}
|
|
996
|
+
for (var i = subviews.length - 1; i >= 0 && hit === null; --i){
|
|
997
|
+
subview = subviews[i];
|
|
980
998
|
locationInSubview = this.layer.convertPointToLayer(locationInView, subview.layer);
|
|
981
999
|
if (!subview.hidden && subview.layer.presentation.alpha > 0 && (!subview.clipsToBounds || subview.containsPoint(locationInSubview))){
|
|
982
|
-
hit
|
|
1000
|
+
hit = subview.hitTest(locationInSubview);
|
|
983
1001
|
}
|
|
984
1002
|
}
|
|
985
1003
|
if (hit === null && this.userInteractionEnabled && this.containsPoint(locationInView)){
|
|
@@ -1143,6 +1161,7 @@ JSClass('UIView', UIResponder, {
|
|
|
1143
1161
|
|
|
1144
1162
|
setAccessibilityLabel: function(accessibilityLabel){
|
|
1145
1163
|
this._accessibilityLabel = accessibilityLabel;
|
|
1164
|
+
this.postAccessibilityNotification(UIAccessibility.Notification.labelChanged);
|
|
1146
1165
|
},
|
|
1147
1166
|
|
|
1148
1167
|
setAccessibilityHidden: function(accessibilityHidden){
|
|
@@ -1204,4 +1223,8 @@ UIView.animateWithOptions = function(options, animations, callback){
|
|
|
1204
1223
|
UIView.noIntrinsicSize = -1;
|
|
1205
1224
|
|
|
1206
1225
|
UIView.Corners = UILayer.Corners;
|
|
1207
|
-
UIView.Sides = UILayer.Sides;
|
|
1226
|
+
UIView.Sides = UILayer.Sides;
|
|
1227
|
+
|
|
1228
|
+
UIView.compareZIndex = function(a, b){
|
|
1229
|
+
return a.layer._zIndex - b.layer._zIndex;
|
|
1230
|
+
};
|
|
@@ -157,6 +157,7 @@ JSClass('UIWindow', UIView, {
|
|
|
157
157
|
this._title = title;
|
|
158
158
|
this.setNeedsLayout();
|
|
159
159
|
this._styler.updateWindow(this);
|
|
160
|
+
this.postAccessibilityNotification(UIAccessibility.Notification.labelChanged);
|
|
160
161
|
},
|
|
161
162
|
|
|
162
163
|
setIcon: function(icon){
|
|
@@ -306,6 +307,16 @@ JSClass('UIWindow', UIView, {
|
|
|
306
307
|
}
|
|
307
308
|
},
|
|
308
309
|
|
|
310
|
+
zIndex: JSDynamicProperty(),
|
|
311
|
+
|
|
312
|
+
setZIndex: function(zIndex){
|
|
313
|
+
logger.warn("setting zIndex on UIWindow has no effect");
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
getZIndex: function(){
|
|
317
|
+
return 0;
|
|
318
|
+
},
|
|
319
|
+
|
|
309
320
|
// -------------------------------------------------------------------------
|
|
310
321
|
// MARK: Traits
|
|
311
322
|
|
|
@@ -1225,13 +1236,10 @@ JSClass("UIRootWindow", UIWindow, {
|
|
|
1225
1236
|
|
|
1226
1237
|
level: UIWindow.Level.back,
|
|
1227
1238
|
|
|
1228
|
-
getAccessibilityLabel: function(){
|
|
1229
|
-
return this.application.accessibilityLabel;
|
|
1230
|
-
},
|
|
1231
|
-
|
|
1232
1239
|
_commonWindowInit: function(){
|
|
1233
1240
|
UIRootWindow.$super._commonWindowInit.call(this);
|
|
1234
1241
|
this.frame = this.application.windowServer.screen.frame;
|
|
1242
|
+
this.title = this.application.bundle.localizedStringForInfoKey("UIApplicationTitle");
|
|
1235
1243
|
},
|
|
1236
1244
|
|
|
1237
1245
|
isAccessibilityElement: false,
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
// #import "UIDraggingSession.js"
|
|
23
23
|
// #import "UIUserInterface.js"
|
|
24
24
|
// #import "UIColorSpace.js"
|
|
25
|
+
// #import "UIScreen.js"
|
|
25
26
|
'use strict';
|
|
26
27
|
|
|
27
28
|
(function(){
|
|
@@ -273,6 +274,7 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
273
274
|
window = this.windowStack[i];
|
|
274
275
|
this.layoutWindow(window);
|
|
275
276
|
}
|
|
277
|
+
JSNotificationCenter.shared.post(UIScreen.Notification.frameChanged, this, {screen: this.screen});
|
|
276
278
|
},
|
|
277
279
|
|
|
278
280
|
layoutWindow: function(window){
|