@breakside/jskit 2023.3.1 → 2023.9.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/Foundation.js +1 -0
- package/Frameworks/Foundation.jsframework/JS/JSAttributedString.js +3 -0
- package/Frameworks/Foundation.jsframework/JS/JSBundle+HTML.js +2 -1
- package/Frameworks/Foundation.jsframework/JS/JSDiff.js +99 -0
- package/Frameworks/Foundation.jsframework/JS/JSNumberFormatter.js +105 -8
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +2 -0
- 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/Node/jskit +1 -0
- 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/CHAreaChart.js +2 -0
- package/Root/Frameworks/ChartKit/CHLineChart.js +2 -0
- package/Root/Frameworks/ChartKit/CHSeriesStyle.js +1 -0
- package/Root/Frameworks/ChartKit/CHStackedAreaChart.js +1 -0
- 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/Foundation.js +1 -0
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSAttributedString.js +3 -0
- package/Root/Frameworks/Foundation/JSBundle+HTML.js +2 -1
- package/Root/Frameworks/Foundation/JSDiff.js +99 -0
- package/Root/Frameworks/Foundation/JSNumberFormatter.js +105 -8
- 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 +1 -0
- package/Root/Frameworks/UIKit/UIActivityIndicatorView.js +1 -1
- package/Root/Frameworks/UIKit/UIBrowserView.js +1 -1
- package/Root/Frameworks/UIKit/UIButton.js +2 -2
- package/Root/Frameworks/UIKit/UICollectionView.js +3 -3
- package/Root/Frameworks/UIKit/UIColorPanel.js +4 -0
- package/Root/Frameworks/UIKit/UIColorWell.js +6 -6
- package/Root/Frameworks/UIKit/UIDisplayServer.js +5 -1
- package/Root/Frameworks/UIKit/UIHTMLTextField.js +1 -1
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +9 -0
- package/Root/Frameworks/UIKit/UILabel.js +1 -1
- package/Root/Frameworks/UIKit/UIListView.js +4 -4
- package/Root/Frameworks/UIKit/UIMenu.js +7 -7
- package/Root/Frameworks/UIKit/UINavigationBar.js +2 -2
- package/Root/Frameworks/UIKit/UIPopupButton.js +5 -5
- package/Root/Frameworks/UIKit/UIProgressIndicatorView.js +1 -1
- package/Root/Frameworks/UIKit/UISlider.js +6 -6
- package/Root/Frameworks/UIKit/UISplitView.js +9 -9
- package/Root/Frameworks/UIKit/UISplitViewController.js +3 -0
- package/Root/Frameworks/UIKit/UIStackView.js +1 -1
- package/Root/Frameworks/UIKit/UITabView.js +5 -5
- package/Root/Frameworks/UIKit/UITextField.js +3 -3
- package/Root/Frameworks/UIKit/UIToolbar.js +1 -1
- package/Root/Frameworks/UIKit/UIView.js +4 -4
- package/Root/Frameworks/UIKit/UIWindow.js +3 -3
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// #import "JSObject.js"
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
JSClass("JSDiff", JSObject, {
|
|
5
|
+
|
|
6
|
+
a: null,
|
|
7
|
+
b: null,
|
|
8
|
+
|
|
9
|
+
mapFunction: null,
|
|
10
|
+
|
|
11
|
+
initWithArrays: function(a, b, mapFunction){
|
|
12
|
+
this.a = a;
|
|
13
|
+
this.b = b;
|
|
14
|
+
if (mapFunction !== undefined){
|
|
15
|
+
this.mapFunction = mapFunction;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
initWithStrings: function(a, b){
|
|
20
|
+
this.initWithArrays(a, b);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
commonIndexes: JSLazyInitProperty(function(){
|
|
24
|
+
var a = this.a;
|
|
25
|
+
var b = this.b;
|
|
26
|
+
if (this.mapFunction !== null){
|
|
27
|
+
a = a.map(this.mapFunction);
|
|
28
|
+
b = b.map(this.mapFunction);
|
|
29
|
+
}
|
|
30
|
+
return this.indexesOfLongestCommonSubsequence(a, 0, a.length - 1, b, 0, b.length - 1);
|
|
31
|
+
}),
|
|
32
|
+
|
|
33
|
+
recursionCount: 0,
|
|
34
|
+
comparisonCount: 0,
|
|
35
|
+
|
|
36
|
+
indexesOfLongestCommonSubsequence: function(a, i0, i1, b, j0, j1){
|
|
37
|
+
++this.recursionCount;
|
|
38
|
+
if (i1 >= i0 && j1 >= j0){
|
|
39
|
+
++this.comparisonCount;
|
|
40
|
+
if (a[i0] === b[j0]){
|
|
41
|
+
var head = [];
|
|
42
|
+
++this.comparisonCount;
|
|
43
|
+
while (i1 >= i0 && j1 >= j0 && a[i0] === b[i0]){
|
|
44
|
+
head.push([i0, j0]);
|
|
45
|
+
++i0;
|
|
46
|
+
++j0;
|
|
47
|
+
++this.comparisonCount;
|
|
48
|
+
}
|
|
49
|
+
return head.concat(this.indexesOfLongestCommonSubsequence(a, i0, i1, b, j0, j1));
|
|
50
|
+
}
|
|
51
|
+
++this.comparisonCount;
|
|
52
|
+
if (a[i1] === b[j1]){
|
|
53
|
+
var tail = [];
|
|
54
|
+
++this.comparisonCount;
|
|
55
|
+
while (i1 >= i0 && j1 >= j0 && a[i1] === b[j1]){
|
|
56
|
+
tail.unshift([i1, j1]);
|
|
57
|
+
--i1;
|
|
58
|
+
--j1;
|
|
59
|
+
++this.comparisonCount;
|
|
60
|
+
}
|
|
61
|
+
return this.indexesOfLongestCommonSubsequence(a, i0, i1, b, j0, j1).concat(tail);
|
|
62
|
+
}
|
|
63
|
+
var sequence1 = this.indexesOfLongestCommonSubsequence(a, i0, i1, b, j0, j1 - 1);
|
|
64
|
+
var sequence2 = this.indexesOfLongestCommonSubsequence(a, i0, i1 - 1, b, j0, j1);
|
|
65
|
+
if (sequence1.length >= sequence2.length){
|
|
66
|
+
return sequence1;
|
|
67
|
+
}
|
|
68
|
+
return sequence2;
|
|
69
|
+
}
|
|
70
|
+
return [];
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
operations: function(){
|
|
74
|
+
var a = [];
|
|
75
|
+
var b = [];
|
|
76
|
+
var i, l;
|
|
77
|
+
var j, k;
|
|
78
|
+
var commonIndexes = this.commonIndexes;
|
|
79
|
+
for (i = 0, l = a.length; i < l; ++i){
|
|
80
|
+
}
|
|
81
|
+
return [a, b];
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
longestCommonSubsequence: function(){
|
|
85
|
+
var commonIndexes = this.commonIndexes;
|
|
86
|
+
var sequence = [];
|
|
87
|
+
var i, l;
|
|
88
|
+
for (i = 0, l = commonIndexes.length; i < l; ++i){
|
|
89
|
+
sequence.push(this.a[commonIndexes[i][0]]);
|
|
90
|
+
}
|
|
91
|
+
return sequence;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
JSDiff.Operation = {
|
|
97
|
+
insert: 1,
|
|
98
|
+
delete: 2
|
|
99
|
+
};
|
|
@@ -526,23 +526,120 @@ JSClass("JSNumberFormatter", JSObject, {
|
|
|
526
526
|
if (this._minimumFractionDigits > 0 || fraction !== 0){
|
|
527
527
|
fraction *= Math.pow(10, this._maximumFractionDigits);
|
|
528
528
|
fraction = Math.round(fraction);
|
|
529
|
-
var extras = this._maximumFractionDigits - this._minimumFractionDigits;
|
|
530
|
-
while (extras > 0 && ((fraction % 10) === 0)){
|
|
531
|
-
fraction /= 10;
|
|
532
|
-
--extras;
|
|
533
|
-
}
|
|
534
529
|
if (this._minimumFractionDigits > 0 || fraction !== 0){
|
|
535
530
|
str += ".";
|
|
536
531
|
var fractionString = fraction.toString();
|
|
537
|
-
while (fractionString.length < this.
|
|
538
|
-
fractionString
|
|
532
|
+
while (fractionString.length < this._maximumFractionDigits){
|
|
533
|
+
fractionString = "0" + fractionString;
|
|
534
|
+
}
|
|
535
|
+
while (fractionString.length > this._minimumFractionDigits && fractionString[fractionString.length - 1] === "0"){
|
|
536
|
+
fractionString = fractionString.substr(0, fractionString.length - 1);
|
|
539
537
|
}
|
|
540
538
|
str += fractionString;
|
|
541
539
|
}
|
|
542
540
|
}
|
|
543
541
|
}
|
|
544
542
|
return prefix + str + suffix;
|
|
545
|
-
}
|
|
543
|
+
},
|
|
544
|
+
|
|
545
|
+
numberFromString: function(string){
|
|
546
|
+
var n = 0;
|
|
547
|
+
var f = 0;
|
|
548
|
+
var d = 1;
|
|
549
|
+
var sign = 1;
|
|
550
|
+
var iterator = string.unicodeIterator();
|
|
551
|
+
var i = 0;
|
|
552
|
+
var l = string.length;
|
|
553
|
+
var c;
|
|
554
|
+
var canSeeSign = true;
|
|
555
|
+
var canSeeCurrency = true;
|
|
556
|
+
var canSeeDecimal = true;
|
|
557
|
+
var canSeeInteger = true;
|
|
558
|
+
var canSeeFraction = false;
|
|
559
|
+
var canSeePercent = false;
|
|
560
|
+
var canSeeGroup = false;
|
|
561
|
+
var seenDigit = false;
|
|
562
|
+
var stringMatches = function(substr){
|
|
563
|
+
if (substr.length === 0){
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
return string.substr(i, substr.length) === substr;
|
|
567
|
+
};
|
|
568
|
+
while (i < l){
|
|
569
|
+
c = string.charCodeAt(i);
|
|
570
|
+
if (c >= 0x30 && c <= 0x39){
|
|
571
|
+
if (canSeeInteger){
|
|
572
|
+
canSeeSign = false;
|
|
573
|
+
canSeeGroup = true;
|
|
574
|
+
canSeePercent = true;
|
|
575
|
+
n *= 10;
|
|
576
|
+
n += (c - 0x30);
|
|
577
|
+
}else if (canSeeFraction){
|
|
578
|
+
f *= 10;
|
|
579
|
+
f += (c - 0x30);
|
|
580
|
+
d *= 10;
|
|
581
|
+
}else{
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
seenDigit = true;
|
|
585
|
+
++i;
|
|
586
|
+
}else if (canSeeSign && stringMatches(this.minusSign)){
|
|
587
|
+
sign = -1;
|
|
588
|
+
canSeeSign = false;
|
|
589
|
+
i += this.minusSign.length;
|
|
590
|
+
}else if (canSeeSign && stringMatches(this.plusSign)){
|
|
591
|
+
canSeeSign = false;
|
|
592
|
+
i += this.plusSign.length;
|
|
593
|
+
}else if (canSeeCurrency && stringMatches(this.currencySymbol)){
|
|
594
|
+
canSeeCurrency = false;
|
|
595
|
+
if (seenDigit){
|
|
596
|
+
canSeeInteger = false;
|
|
597
|
+
canSeeDecimal = false;
|
|
598
|
+
canSeeFraction = false;
|
|
599
|
+
}
|
|
600
|
+
i += this.currencySymbol.length;
|
|
601
|
+
}else if (canSeePercent && stringMatches(this.percentSymbol)){
|
|
602
|
+
canSeePercent = false;
|
|
603
|
+
if (seenDigit){
|
|
604
|
+
canSeeInteger = false;
|
|
605
|
+
canSeeDecimal = false;
|
|
606
|
+
canSeeFraction = false;
|
|
607
|
+
}
|
|
608
|
+
i += this.percentSymbol.length;
|
|
609
|
+
}else if (canSeePercent && stringMatches(this.perMilleSymbol)){
|
|
610
|
+
canSeePercent = false;
|
|
611
|
+
if (seenDigit){
|
|
612
|
+
canSeeInteger = false;
|
|
613
|
+
canSeeDecimal = false;
|
|
614
|
+
canSeeFraction = false;
|
|
615
|
+
}
|
|
616
|
+
i += this.perMilleSymbol.length;
|
|
617
|
+
}else if (canSeeDecimal && stringMatches(this.decimalSeparator)){
|
|
618
|
+
canSeeDecimal = false;
|
|
619
|
+
canSeeGroup = false;
|
|
620
|
+
canSeeInteger = false;
|
|
621
|
+
canSeeFraction = true;
|
|
622
|
+
i += this.decimalSeparator.length;
|
|
623
|
+
}else if (canSeeGroup && stringMatches(this.groupingSeparator)){
|
|
624
|
+
i += this.groupingSeparator.length;
|
|
625
|
+
}else if (c == 0x20){
|
|
626
|
+
++i;
|
|
627
|
+
}else{
|
|
628
|
+
return null;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (!seenDigit){
|
|
632
|
+
return null;
|
|
633
|
+
}
|
|
634
|
+
if (f > 0){
|
|
635
|
+
n += f / d;
|
|
636
|
+
}
|
|
637
|
+
n /= this.multiplier;
|
|
638
|
+
if (sign < 0){
|
|
639
|
+
n = -n;
|
|
640
|
+
}
|
|
641
|
+
return n;
|
|
642
|
+
},
|
|
546
643
|
|
|
547
644
|
});
|
|
548
645
|
|
|
@@ -229,6 +229,7 @@ UIAccessibility.Notification = {
|
|
|
229
229
|
keyWindowChanged: "UIAccessibility.Notification.keyWindowChanged",
|
|
230
230
|
mainWindowChanged: "UIAccessibility.Notification.mainWindowChanged",
|
|
231
231
|
rowCountChanged: "UIAccessibility.Notification.rowCountChanged",
|
|
232
|
+
columnCountChanged: "UIAccessibility.Notification.columnCountChanged",
|
|
232
233
|
rowExpanded: "UIAccessibility.Notification.rowExpanded",
|
|
233
234
|
rowCollapsed: "UIAccessibility.Notification.rowCollapsed",
|
|
234
235
|
selectedChildrenChanged: "UIAccessibility.Notification.selectedChildrenChanged",
|
|
@@ -61,7 +61,7 @@ JSClass("UIActivityIndicatorView", UIView, {
|
|
|
61
61
|
var image = spec.valueForKey("spriteImage", JSImage);
|
|
62
62
|
var singleFrameHeight;
|
|
63
63
|
if (spec.containsKey('singleFrameHeight')){
|
|
64
|
-
singleFrameHeight = spec.valueForKey("singleFrameHeight");
|
|
64
|
+
singleFrameHeight = spec.valueForKey("singleFrameHeight", Number);
|
|
65
65
|
}
|
|
66
66
|
this.initWithSpriteImage(image, singleFrameHeight);
|
|
67
67
|
}
|
|
@@ -30,7 +30,7 @@ JSClass("UIBrowserView", UIScrollView, {
|
|
|
30
30
|
initWithSpec: function(spec){
|
|
31
31
|
UIBrowserView.$super.initWithSpec.call(this, spec);
|
|
32
32
|
if (spec.containsKey('dividerSize')){
|
|
33
|
-
this._dividerSize = spec.valueForKey("dividerSize");
|
|
33
|
+
this._dividerSize = spec.valueForKey("dividerSize", Number);
|
|
34
34
|
}
|
|
35
35
|
if (spec.containsKey('dividerColor')){
|
|
36
36
|
this._dividerColor = spec.valueForKey("dividerColor", JSColor);
|
|
@@ -367,7 +367,7 @@ JSClass("UIButtonStyler", UIControlStyler, {
|
|
|
367
367
|
this.titleInsets = spec.valueForKey("titleInsets", JSInsets);
|
|
368
368
|
}
|
|
369
369
|
if (spec.containsKey('titleImageSpacing')){
|
|
370
|
-
this.titleImageSpacing = spec.valueForKey("titleImageSpacing");
|
|
370
|
+
this.titleImageSpacing = spec.valueForKey("titleImageSpacing", Number);
|
|
371
371
|
}
|
|
372
372
|
if (spec.containsKey('font')){
|
|
373
373
|
this.font = spec.valueForKey("font", JSFont);
|
|
@@ -531,7 +531,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
531
531
|
this.overTitleColor = spec.valueForKey("overTitleColor", JSColor);
|
|
532
532
|
}
|
|
533
533
|
if (spec.containsKey('cornerRadius')){
|
|
534
|
-
this.cornerRadius = spec.valueForKey("cornerRadius");
|
|
534
|
+
this.cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
535
535
|
}
|
|
536
536
|
this._commonInit();
|
|
537
537
|
},
|
|
@@ -83,7 +83,7 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
83
83
|
this._styler = spec.valueForKey("styler", UICollectionView.Styler);
|
|
84
84
|
}
|
|
85
85
|
if (spec.containsKey('layout')){
|
|
86
|
-
this.collectionViewLayout = spec.valueForKey("layout"
|
|
86
|
+
this.collectionViewLayout = spec.valueForKey("layout");
|
|
87
87
|
}else{
|
|
88
88
|
throw new Error("layout is a required property in a UICollectionView spec file");
|
|
89
89
|
}
|
|
@@ -109,7 +109,7 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
109
109
|
if (typeof(reuse) === 'string'){
|
|
110
110
|
this.registerCellClassForReuseIdentifier(JSClass.FromName(reuse), identifier);
|
|
111
111
|
}else{
|
|
112
|
-
this.registerCellClassForReuseIdentifier(JSClass.FromName(reuse.valueForKey('className')), identifier, reuse.valueForKey('styler'));
|
|
112
|
+
this.registerCellClassForReuseIdentifier(JSClass.FromName(reuse.valueForKey('className')), identifier, reuse.valueForKey('styler', UICollectionView.Styler));
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
}
|
|
@@ -123,7 +123,7 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
123
123
|
if (typeof(reuse) === 'string'){
|
|
124
124
|
this.registerViewClassForReuseIdentifier(JSClass.FromName(reuse), identifier);
|
|
125
125
|
}else{
|
|
126
|
-
this.registerViewClassForReuseIdentifier(JSClass.FromName(reuse.valueForKey('className')), identifier, reuse.valueForKey('styler'));
|
|
126
|
+
this.registerViewClassForReuseIdentifier(JSClass.FromName(reuse.valueForKey('className')), identifier, reuse.valueForKey('styler', UICollectionView.Styler));
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -187,6 +187,10 @@ JSClass("UIColorPanelViewController", UIViewController, {
|
|
|
187
187
|
this.component2Field = UITextField.initWithStyler(componentStyler);
|
|
188
188
|
this.component3Field = UITextField.initWithStyler(componentStyler);
|
|
189
189
|
this.component4Field = UITextField.initWithStyler(componentStyler);
|
|
190
|
+
this.component1Field.keyboardType = UITextInput.KeyboardType.number;
|
|
191
|
+
this.component2Field.keyboardType = UITextInput.KeyboardType.number;
|
|
192
|
+
this.component3Field.keyboardType = UITextInput.KeyboardType.number;
|
|
193
|
+
this.component4Field.keyboardType = UITextInput.KeyboardType.number;
|
|
190
194
|
this.hexLabel = UILabel.init();
|
|
191
195
|
this.component1Label = UILabel.init();
|
|
192
196
|
this.component2Label = UILabel.init();
|
|
@@ -323,16 +323,16 @@ JSClass("UIColorWellDefaultStyler", UIColorWellStyler, {
|
|
|
323
323
|
this.disabledBorderColor = JSColor.clear;
|
|
324
324
|
}
|
|
325
325
|
if (spec.containsKey("normalBorderWidth")){
|
|
326
|
-
this.normalBorderWidth = spec.valueForKey("normalBorderWidth");
|
|
326
|
+
this.normalBorderWidth = spec.valueForKey("normalBorderWidth", Number);
|
|
327
327
|
}
|
|
328
328
|
if (spec.containsKey("activeBorderWidth")){
|
|
329
|
-
this.activeBorderWidth = spec.valueForKey("activeBorderWidth");
|
|
329
|
+
this.activeBorderWidth = spec.valueForKey("activeBorderWidth", Number);
|
|
330
330
|
}
|
|
331
331
|
if (spec.containsKey("dropTargetBorderWidth")){
|
|
332
|
-
this.dropTargetBorderWidth = spec.valueForKey("dropTargetBorderWidth");
|
|
332
|
+
this.dropTargetBorderWidth = spec.valueForKey("dropTargetBorderWidth", Number);
|
|
333
333
|
}
|
|
334
334
|
if (spec.containsKey("disabledBorderWidth")){
|
|
335
|
-
this.disabledBorderWidth = spec.valueForKey("disabledBorderWidth");
|
|
335
|
+
this.disabledBorderWidth = spec.valueForKey("disabledBorderWidth", Number);
|
|
336
336
|
}
|
|
337
337
|
if (spec.containsKey("wellInsets")){
|
|
338
338
|
this.wellInsets = spec.valueForKey("wellInsets", JSInsets);
|
|
@@ -340,7 +340,7 @@ JSClass("UIColorWellDefaultStyler", UIColorWellStyler, {
|
|
|
340
340
|
this.wellInsets = JSInsets.Zero;
|
|
341
341
|
}
|
|
342
342
|
if (spec.containsKey("cornerRadius")){
|
|
343
|
-
this.cornerRadius = spec.valueForKey("cornerRadius");
|
|
343
|
+
this.cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
344
344
|
}
|
|
345
345
|
if (spec.containsKey("size")){
|
|
346
346
|
this.size = spec.valueForKey("size", JSSize);
|
|
@@ -358,7 +358,7 @@ JSClass("UIColorWellDefaultStyler", UIColorWellStyler, {
|
|
|
358
358
|
this.wellInnerShadowOffset = JSPoint(0, 1);
|
|
359
359
|
}
|
|
360
360
|
if (spec.containsKey("wellInnerShadowRadius")){
|
|
361
|
-
this.wellInnerShadowRadius = spec.valueForKey("wellInnerShadowRadius");
|
|
361
|
+
this.wellInnerShadowRadius = spec.valueForKey("wellInnerShadowRadius", Number);
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
// #import Foundation
|
|
17
17
|
'use strict';
|
|
18
18
|
|
|
19
|
+
(function(){
|
|
20
|
+
|
|
19
21
|
JSClass("UIDisplayServer", JSObject, {
|
|
20
22
|
|
|
21
23
|
typesetter: JSReadOnlyProperty("_typesetter"),
|
|
@@ -461,4 +463,6 @@ UIDisplayServerQueue.prototype = {
|
|
|
461
463
|
delete this.map[link.value.objectID];
|
|
462
464
|
}
|
|
463
465
|
|
|
464
|
-
};
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
})();
|
|
@@ -57,7 +57,7 @@ JSClass("UIHTMLTextField", UIControl, {
|
|
|
57
57
|
this.leftAccessoryInsets = spec.valueForKey("leftAccessoryInsets", JSInsets);
|
|
58
58
|
}
|
|
59
59
|
if (spec.containsKey('leftAccessoryVisibility')){
|
|
60
|
-
this.leftAccessoryVisibility = spec.valueForKey("leftAccessoryVisibility");
|
|
60
|
+
this.leftAccessoryVisibility = spec.valueForKey("leftAccessoryVisibility", UITextField.AccessoryVisibility);
|
|
61
61
|
}
|
|
62
62
|
if (spec.containsKey('rightImage')){
|
|
63
63
|
this.rightImage = spec.valueForKey("rightImage", JSImage);
|
|
@@ -928,6 +928,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
928
928
|
this.accessibilityObservers.selectedChildrenChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.selectedChildrenChanged, null, this.handleAccessibilitySelectedChildrenChanged, this);
|
|
929
929
|
this.accessibilityObservers.firstResponderChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.firstResponderChanged, null, this.handleAccessibilityFirstResponderChanged, this);
|
|
930
930
|
this.accessibilityObservers.rowCountChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.rowCountChanged, null, this.handleAccessibilityRowCountChanged, this);
|
|
931
|
+
this.accessibilityObservers.columnCountChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.columnCountChanged, null, this.handleAccessibilityColumnCountChanged, this);
|
|
931
932
|
this.accessibilityObservers.rowExpanded = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.rowExpanded, null, this.handleAccessibilityRowExpanded, this);
|
|
932
933
|
this.accessibilityObservers.rowCollapsed = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.rowCollapsed, null, this.handleAccessibilityRowCollapsed, this);
|
|
933
934
|
},
|
|
@@ -1045,6 +1046,14 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
1045
1046
|
}
|
|
1046
1047
|
},
|
|
1047
1048
|
|
|
1049
|
+
handleAccessibilityColumnCountChanged: function(notification){
|
|
1050
|
+
var element = notification.sender;
|
|
1051
|
+
var context = this.contextForAccessibilityElement(element);
|
|
1052
|
+
if (context !== null){
|
|
1053
|
+
context.updateAccessibilityColumnCount(element);
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
|
|
1048
1057
|
handleAccessibilityFirstResponderChanged: function(notification){
|
|
1049
1058
|
var window = notification.sender;
|
|
1050
1059
|
var responder = window.firstResponder || window;
|
|
@@ -74,7 +74,7 @@ JSClass('UILabel', UIView, {
|
|
|
74
74
|
this.allowsSelection = spec.valueForKey("allowsSelection");
|
|
75
75
|
}
|
|
76
76
|
if (spec.containsKey("selectionColor")){
|
|
77
|
-
this._selectionColor = spec.valueForKey("selectionColor");
|
|
77
|
+
this._selectionColor = spec.valueForKey("selectionColor", JSColor);
|
|
78
78
|
}else{
|
|
79
79
|
this._selectionColor = JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2));
|
|
80
80
|
}
|
|
@@ -84,13 +84,13 @@ JSClass("UIListView", UIScrollView, {
|
|
|
84
84
|
}
|
|
85
85
|
this._commonListInit();
|
|
86
86
|
if (spec.containsKey('rowHeight')){
|
|
87
|
-
this._rowHeight = spec.valueForKey("rowHeight");
|
|
87
|
+
this._rowHeight = spec.valueForKey("rowHeight", Number);
|
|
88
88
|
}
|
|
89
89
|
if (spec.containsKey('headerHeight')){
|
|
90
|
-
this._headerHeight = spec.valueForKey("headerHeight");
|
|
90
|
+
this._headerHeight = spec.valueForKey("headerHeight", Number);
|
|
91
91
|
}
|
|
92
92
|
if (spec.containsKey('footerHeight')){
|
|
93
|
-
this._footerHeight = spec.valueForKey("footerHeight");
|
|
93
|
+
this._footerHeight = spec.valueForKey("footerHeight", Number);
|
|
94
94
|
}
|
|
95
95
|
if (spec.containsKey('delegate')){
|
|
96
96
|
this.delegate = spec.valueForKey("delegate");
|
|
@@ -3125,7 +3125,7 @@ JSClass("UIListViewDefaultStyler", UIListViewStyler, {
|
|
|
3125
3125
|
this.cellContentInsets = spec.valueForKey("cellContentInsets", JSInsets);
|
|
3126
3126
|
}
|
|
3127
3127
|
if (spec.containsKey('cellContentCornerRadius')){
|
|
3128
|
-
this.cellContentCornerRadius = spec.valueForKey("cellContentCornerRadius");
|
|
3128
|
+
this.cellContentCornerRadius = spec.valueForKey("cellContentCornerRadius", Number);
|
|
3129
3129
|
}
|
|
3130
3130
|
this._commonStylerInit();
|
|
3131
3131
|
},
|
|
@@ -485,10 +485,10 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
485
485
|
this.shadowColor = JSColor.menuShadow;
|
|
486
486
|
this.shadowOffset = JSPoint.Zero;
|
|
487
487
|
if (spec.containsKey('capSize')){
|
|
488
|
-
this._capSize = spec.valueForKey("capSize");
|
|
488
|
+
this._capSize = spec.valueForKey("capSize", Number);
|
|
489
489
|
}
|
|
490
490
|
if (spec.containsKey('cornerRadius')){
|
|
491
|
-
this._cornerRadius = spec.valueForKey("cornerRadius");
|
|
491
|
+
this._cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
492
492
|
}
|
|
493
493
|
if (spec.containsKey('textColor')){
|
|
494
494
|
this._textColor = spec.valueForKey("textColor", JSColor);
|
|
@@ -509,7 +509,7 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
509
509
|
this._borderColor = spec.valueForKey("borderColor", JSColor);
|
|
510
510
|
}
|
|
511
511
|
if (spec.containsKey('borderWidth')){
|
|
512
|
-
this._borderWidth = spec.valueForKey("borderWidth");
|
|
512
|
+
this._borderWidth = spec.valueForKey("borderWidth", Number);
|
|
513
513
|
}
|
|
514
514
|
if (spec.containsKey('shadowColor')){
|
|
515
515
|
this.shadowColor = spec.valueForKey("shadowColor", JSColor);
|
|
@@ -518,13 +518,13 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
518
518
|
this.shadowOffset = spec.valueForKey("shadowOffset", JSPoint);
|
|
519
519
|
}
|
|
520
520
|
if (spec.containsKey('shadowRadius')){
|
|
521
|
-
this.shadowRadius = spec.valueForKey("shadowRadius");
|
|
521
|
+
this.shadowRadius = spec.valueForKey("shadowRadius", Number);
|
|
522
522
|
}
|
|
523
523
|
if (spec.containsKey('separatorSize')){
|
|
524
|
-
this.separatorSize = spec.valueForKey("separatorSize");
|
|
524
|
+
this.separatorSize = spec.valueForKey("separatorSize", Number);
|
|
525
525
|
}
|
|
526
526
|
if (spec.containsKey('separatorLineWidth')){
|
|
527
|
-
this.separatorLineWidth = spec.valueForKey("separatorLineWidth");
|
|
527
|
+
this.separatorLineWidth = spec.valueForKey("separatorLineWidth", Number);
|
|
528
528
|
}
|
|
529
529
|
if (spec.containsKey('separatorColor')){
|
|
530
530
|
this.separatorColor = spec.valueForKey("separatorColor", JSColor);
|
|
@@ -535,7 +535,7 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
535
535
|
this.itemContentInsets = spec.valueForKey("itemContentInsets", JSInsets);
|
|
536
536
|
}
|
|
537
537
|
if (spec.containsKey('indentationSize')){
|
|
538
|
-
this.indentationSize = spec.valueForKey("indentationSize");
|
|
538
|
+
this.indentationSize = spec.valueForKey("indentationSize", Number);
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
541
|
|
|
@@ -261,7 +261,7 @@ JSClass("UINavigationBarStyler", JSObject, {
|
|
|
261
261
|
this.itemFont = spec.valueForKey("itemFont", JSFont);
|
|
262
262
|
}
|
|
263
263
|
if (spec.containsKey("height")){
|
|
264
|
-
this.height = spec.valueForKey("height");
|
|
264
|
+
this.height = spec.valueForKey("height", Number);
|
|
265
265
|
}
|
|
266
266
|
this._fillInStyles();
|
|
267
267
|
},
|
|
@@ -340,7 +340,7 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
340
340
|
this.contentSeparatorColor = spec.valueForKey("contentSeparatorColor", JSColor);
|
|
341
341
|
}
|
|
342
342
|
if (spec.containsKey("contentSeparatorSize")){
|
|
343
|
-
this.contentSeparatorSize = spec.valueForKey("contentSeparatorSize");
|
|
343
|
+
this.contentSeparatorSize = spec.valueForKey("contentSeparatorSize", Number);
|
|
344
344
|
}
|
|
345
345
|
if (spec.containsKey("titleColor")){
|
|
346
346
|
this.titleColor = spec.valueForKey("titleColor", JSColor);
|
|
@@ -573,16 +573,16 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
|
|
|
573
573
|
this.shadowOffset = spec.valueForKey("shadowOffset", JSPoint);
|
|
574
574
|
}
|
|
575
575
|
if (spec.containsKey("shadowRadius")){
|
|
576
|
-
this.shadowRadius = spec.valueForKey("shadowRadius");
|
|
576
|
+
this.shadowRadius = spec.valueForKey("shadowRadius", Number);
|
|
577
577
|
}
|
|
578
578
|
if (spec.containsKey("borderWidth")){
|
|
579
|
-
this.borderWidth = spec.valueForKey("borderWidth");
|
|
579
|
+
this.borderWidth = spec.valueForKey("borderWidth", Number);
|
|
580
580
|
}
|
|
581
581
|
if (spec.containsKey("indicatorSpacing")){
|
|
582
|
-
this.indicatorSpacing = spec.valueForKey("indicatorSpacing");
|
|
582
|
+
this.indicatorSpacing = spec.valueForKey("indicatorSpacing", Number);
|
|
583
583
|
}
|
|
584
584
|
if (spec.containsKey("cornerRadius")){
|
|
585
|
-
this.cornerRadius = spec.valueForKey("cornerRadius");
|
|
585
|
+
this.cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
this._fillInMissingColors();
|
|
@@ -813,7 +813,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
813
813
|
this.showsOverState = true;
|
|
814
814
|
}
|
|
815
815
|
if (spec.containsKey("cornerRadius")){
|
|
816
|
-
this.cornerRadius = spec.valueForKey("cornerRadius");
|
|
816
|
+
this.cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
817
817
|
}
|
|
818
818
|
if (spec.containsKey("titleInsets")){
|
|
819
819
|
this.titleInsets = spec.valueForKey("titleInsets", JSInsets);
|