@breakside/jskit 2025.8.0 → 2025.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/JSAttributedString.js +6 -0
- 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/JSAttributedString.js +6 -0
- 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/UIAnimationTransaction.js +5 -4
- package/Root/Frameworks/UIKit/UIApplication.js +1 -1
- package/Root/Frameworks/UIKit/UIHTMLApplication.js +8 -4
- package/Root/Frameworks/UIKit/UIHTMLContentEditableTextInputManager.js +23 -15
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +49 -2
- package/Root/Frameworks/UIKit/UIListView.js +1 -1
- package/Root/Frameworks/UIKit/UIPopupWindow.js +1 -20
- package/Root/Frameworks/UIKit/UITextEditor.js +6 -0
- package/Root/Frameworks/UIKit/UITextField.js +3 -1
- package/Root/Frameworks/UIKit/UIWindow.js +3 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
13
13
|
}
|
|
@@ -35,6 +35,9 @@ JSClass("JSAttributedString", JSObject, {
|
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
initWithString: function(string, attributes){
|
|
38
|
+
if (typeof(string) !== "string" && !(string instanceof String)){
|
|
39
|
+
throw new Error("JSAttributedString.initWithString() called with non-string");
|
|
40
|
+
}
|
|
38
41
|
if (attributes === undefined){
|
|
39
42
|
attributes = {};
|
|
40
43
|
}
|
|
@@ -178,6 +181,9 @@ JSClass("JSAttributedString", JSObject, {
|
|
|
178
181
|
},
|
|
179
182
|
|
|
180
183
|
initWithAttributedString: function(attributedString, defaultAttributes){
|
|
184
|
+
if (!(attributedString instanceof JSAttributedString)){
|
|
185
|
+
throw new Error("JSAttributedString.initWithAttributedString called with non-JSAttributedString");
|
|
186
|
+
}
|
|
181
187
|
this._string = attributedString.string;
|
|
182
188
|
this._runs = [];
|
|
183
189
|
var run;
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.9.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.9.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "d6edda13912309c1edca976270293b135ca54c5b"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -35,6 +35,9 @@ JSClass("JSAttributedString", JSObject, {
|
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
initWithString: function(string, attributes){
|
|
38
|
+
if (typeof(string) !== "string" && !(string instanceof String)){
|
|
39
|
+
throw new Error("JSAttributedString.initWithString() called with non-string");
|
|
40
|
+
}
|
|
38
41
|
if (attributes === undefined){
|
|
39
42
|
attributes = {};
|
|
40
43
|
}
|
|
@@ -178,6 +181,9 @@ JSClass("JSAttributedString", JSObject, {
|
|
|
178
181
|
},
|
|
179
182
|
|
|
180
183
|
initWithAttributedString: function(attributedString, defaultAttributes){
|
|
184
|
+
if (!(attributedString instanceof JSAttributedString)){
|
|
185
|
+
throw new Error("JSAttributedString.initWithAttributedString called with non-JSAttributedString");
|
|
186
|
+
}
|
|
181
187
|
this._string = attributedString.string;
|
|
182
188
|
this._runs = [];
|
|
183
189
|
var run;
|
|
@@ -94,7 +94,7 @@ JSClass('UIAnimationTransaction', JSObject, {
|
|
|
94
94
|
_flush: function(){
|
|
95
95
|
if (this.animations.length === 0){
|
|
96
96
|
if (this.completionFunction){
|
|
97
|
-
this.completionFunction
|
|
97
|
+
UIApplication.shared.windowServer.displayServer.schedule(this.completionFunction, this);
|
|
98
98
|
}
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
@@ -122,11 +122,12 @@ UIAnimationTransaction.commit = function(){
|
|
|
122
122
|
UIAnimationTransaction.committed.push(transaction);
|
|
123
123
|
if (UIAnimationTransaction.stack.length === 0){
|
|
124
124
|
UIAnimationTransaction.currentTransaction = null;
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
var committed = UIAnimationTransaction.committed;
|
|
126
|
+
UIAnimationTransaction.committed = [];
|
|
127
|
+
for (var i = 0, l = committed.length; i < l; ++i){
|
|
128
|
+
transaction = committed[i];
|
|
127
129
|
transaction._flush();
|
|
128
130
|
}
|
|
129
|
-
UIAnimationTransaction.committed = [];
|
|
130
131
|
}else{
|
|
131
132
|
UIAnimationTransaction.currentTransaction = UIAnimationTransaction.stack[UIAnimationTransaction.stack.length - 1];
|
|
132
133
|
}
|
|
@@ -426,7 +426,7 @@ JSClass('UIApplication', UIResponder, {
|
|
|
426
426
|
target = undefined;
|
|
427
427
|
}
|
|
428
428
|
if (target instanceof JSObject){
|
|
429
|
-
actionLogger.debug("sendAction " + (action.name || ("anonymousfn")) + " to %{public}#%d from %{public}#%d", target.$class.className, target.
|
|
429
|
+
actionLogger.debug("sendAction " + (action.name || ("anonymousfn")) + " to %{public}#%d from %{public}#%d", target.$class.className, target.objectID, sender.$class.className, sender.objectID);
|
|
430
430
|
}else{
|
|
431
431
|
actionLogger.debug("sendAction " + (action.name || ("anonymousfn")) + " from %{public}#%d", sender.$class.className, sender.objectID);
|
|
432
432
|
}
|
|
@@ -80,11 +80,15 @@ JSClass("UIHTMLApplication", UIApplication, {
|
|
|
80
80
|
};
|
|
81
81
|
this.stop(open);
|
|
82
82
|
}else{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
this.delegate.applicationBrowserBlockedWindowForURL
|
|
83
|
+
try{
|
|
84
|
+
var child = this.domWindow.open(url.encodedString);
|
|
85
|
+
if ((url.scheme == "http" || url.scheme == "https") && !child){
|
|
86
|
+
if (this.delegate && this.delegate.applicationBrowserBlockedWindowForURL){
|
|
87
|
+
this.delegate.applicationBrowserBlockedWindowForURL(this, url);
|
|
88
|
+
}
|
|
87
89
|
}
|
|
90
|
+
}catch (e){
|
|
91
|
+
logger.warning("unable to open URL `%{public}`: %{error}", url.encodedString, e);
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
},
|
|
@@ -394,21 +394,29 @@ JSClass('UIHTMLContentEditableTextInputManager', UITextInputManager, {
|
|
|
394
394
|
// We don't want to preventDefault on anything that looks like
|
|
395
395
|
// it'll cause input
|
|
396
396
|
var text = null;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}else if (e.key
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
397
|
+
if (e.key === null){
|
|
398
|
+
logger.warn("got a null key value for keydown code:%{public} keyCode:%d", e.code, e.keyCode);
|
|
399
|
+
}else if (e.key === undefined){
|
|
400
|
+
logger.warn("got an undefined key value for keydown code:%{public} keyCode:%d", e.code, e.keyCode);
|
|
401
|
+
}else if (e.key === ""){
|
|
402
|
+
logger.warn("got an empty key value for keydown code:%{public} keyCode:%d", e.code, e.keyCode);
|
|
403
|
+
}else{
|
|
404
|
+
var iterator = e.key.userPerceivedCharacterIterator();
|
|
405
|
+
if (iterator.nextIndex === e.key.length){
|
|
406
|
+
text = e.key;
|
|
407
|
+
preventDefault = false;
|
|
408
|
+
}else if (e.key.startsWith(".") && e.key.length > 1){
|
|
409
|
+
// iOS has keys for ".com", ".org", etc. They don't follow
|
|
410
|
+
// the key string (https://www.w3.org/TR/uievents-key/#key-string)
|
|
411
|
+
// specification, in that they are more than one user percived
|
|
412
|
+
// character long. But since they always start with a ".", we
|
|
413
|
+
// can special case it and assume when key = ".anything", it's
|
|
414
|
+
// meant to be inserted
|
|
415
|
+
text = e.key;
|
|
416
|
+
preventDefault = false;
|
|
417
|
+
}else if (e.key == "Backspace" || e.key == "Delete"){
|
|
418
|
+
preventDefault = false;
|
|
419
|
+
}
|
|
412
420
|
}
|
|
413
421
|
this.windowServer._createKeyEventFromDOMEvent(e, UIEvent.Type.keyDown, preventDefault);
|
|
414
422
|
if (!this.supportsBeforeinputEvent && this.textInputClient !== null && text !== null && text !== ""){
|
|
@@ -497,6 +497,9 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
497
497
|
},
|
|
498
498
|
|
|
499
499
|
_correctedEventKey: function(key){
|
|
500
|
+
if (key === null || key === undefined || key === ""){
|
|
501
|
+
return "Unidentified";
|
|
502
|
+
}
|
|
500
503
|
if (key === 'Left'){
|
|
501
504
|
return 'ArrowLeft';
|
|
502
505
|
}
|
|
@@ -881,7 +884,16 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
881
884
|
return modifiers;
|
|
882
885
|
},
|
|
883
886
|
|
|
887
|
+
_hasWarnedAboutMouseLocation: false,
|
|
888
|
+
|
|
884
889
|
_updateMouseLocation: function(e){
|
|
890
|
+
if (isNaN(e.clientX) || isNaN(e.clientY)){
|
|
891
|
+
if (!this._hasWarnedAboutMouseLocation){
|
|
892
|
+
this._hasWarnedAboutMouseLocation = true;
|
|
893
|
+
logger.warn("not updating mouse location: e.clientX = %{public}, e.clientY = %{public}", typeof(e.clientX), typeof(e.clientY));
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
885
897
|
this.mouseLocation.x = e.clientX - this._screenClientOrigin.x;
|
|
886
898
|
this.mouseLocation.y = e.clientY - this._screenClientOrigin.y;
|
|
887
899
|
},
|
|
@@ -1391,8 +1403,43 @@ JSClass("UIHTMLDataTransferPasteboard", UIPasteboard, {
|
|
|
1391
1403
|
_updateDataTranserObjectForType: function(type){
|
|
1392
1404
|
if (this._dataTransfer !== null){
|
|
1393
1405
|
var objects = this.objectsForType(type);
|
|
1394
|
-
|
|
1395
|
-
|
|
1406
|
+
if (objects !== null){
|
|
1407
|
+
var dictionaries = [];
|
|
1408
|
+
var dictionary;
|
|
1409
|
+
var obj;
|
|
1410
|
+
var i, l;
|
|
1411
|
+
for (i = 0, l = objects.length; i < l; ++i){
|
|
1412
|
+
obj = objects[i];
|
|
1413
|
+
if (obj instanceof JSObject){
|
|
1414
|
+
if (obj.dictionaryRepresentation){
|
|
1415
|
+
dictionaries.push(obj.dictionaryRepresentation());
|
|
1416
|
+
}else if (obj.encodeToStorableDictionary){
|
|
1417
|
+
dictionary = {};
|
|
1418
|
+
obj.encodeToStorableDictionary(dictionary);
|
|
1419
|
+
dictionaries.push(dictionary);
|
|
1420
|
+
}else if (obj.encodeToDictionary){
|
|
1421
|
+
dictionary = {};
|
|
1422
|
+
obj.encodeToDictionary(dictionary);
|
|
1423
|
+
dictionaries.push(dictionary);
|
|
1424
|
+
}else{
|
|
1425
|
+
// intentionally dropping object form html pasteboard
|
|
1426
|
+
// because we don't know how to get a plain dictionary
|
|
1427
|
+
// representation of it. These objects will not be
|
|
1428
|
+
// droppable outside of the source window, but will
|
|
1429
|
+
// still be droppable within the source window as
|
|
1430
|
+
// in-memory objects.
|
|
1431
|
+
}
|
|
1432
|
+
}else{
|
|
1433
|
+
dictionaries.push(obj);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
try{
|
|
1437
|
+
var json = JSON.stringify(dictionaries);
|
|
1438
|
+
this._dataTransfer.setData(type, json);
|
|
1439
|
+
}catch (e){
|
|
1440
|
+
logger.warning("Unable to serialize pasteboard objects to JSON: %{error}", e);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1396
1443
|
}
|
|
1397
1444
|
},
|
|
1398
1445
|
|
|
@@ -2765,7 +2765,7 @@ VisibleItem.prototype = Object.create(Function.prototype, {
|
|
|
2765
2765
|
view: {
|
|
2766
2766
|
configurable: true,
|
|
2767
2767
|
set: function(view){
|
|
2768
|
-
Object.defineProperty(this, 'view', {value: view});
|
|
2768
|
+
Object.defineProperty(this, 'view', {writable: true, value: view});
|
|
2769
2769
|
Object.defineProperty(this, 'rect', {
|
|
2770
2770
|
get: function(){
|
|
2771
2771
|
return JSRect(
|
|
@@ -297,26 +297,7 @@ JSClass("UIPopupWindow", UIWindow, {
|
|
|
297
297
|
}
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
var window = this;
|
|
304
|
-
var transform = this.transform;
|
|
305
|
-
this._modalAnimator = UIViewPropertyAnimator.initWithDuration(0.075);
|
|
306
|
-
this._modalAnimator.addAnimations(function(){
|
|
307
|
-
window.transform = transform.scaledBy(1.15);
|
|
308
|
-
});
|
|
309
|
-
this._modalAnimator.addCompletion(function(){
|
|
310
|
-
window._modalAnimator = UIViewPropertyAnimator.initWithDuration(0.075);
|
|
311
|
-
window._modalAnimator.addAnimations(function(){
|
|
312
|
-
window.transform = transform;
|
|
313
|
-
});
|
|
314
|
-
window._modalAnimator.addCompletion(function(){
|
|
315
|
-
window._modalAnimator = null;
|
|
316
|
-
});
|
|
317
|
-
window._modalAnimator.start();
|
|
318
|
-
});
|
|
319
|
-
this._modalAnimator.start();
|
|
300
|
+
UIPopupWindow.$super.indicateModalStatus.call(this);
|
|
320
301
|
},
|
|
321
302
|
|
|
322
303
|
accessibilityRole: UIAccessibility.Role.popover
|
|
@@ -169,6 +169,12 @@ JSClass("UITextEditor", JSObject, {
|
|
|
169
169
|
|
|
170
170
|
handleMouseDraggedAtLocation: function(location, event){
|
|
171
171
|
if (this._handledSelectOnMouseDown){
|
|
172
|
+
if (this.selections.length === 0){
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (this._draggingSelectionIndex < 0 || this._draggingSelectionIndex >= this.selections.length){
|
|
176
|
+
this._draggingSelectionIndex = 0;
|
|
177
|
+
}
|
|
172
178
|
var draggingSelection = this.selections[this._draggingSelectionIndex];
|
|
173
179
|
this.selections.splice(this._draggingSelectionIndex, 1);
|
|
174
180
|
var newSelection = this._createSelectionAtLocation(location);
|
|
@@ -620,7 +620,9 @@ JSClass("UITextField", UIControl, {
|
|
|
620
620
|
pasteAndMatchStyle: function(){
|
|
621
621
|
if (UIPasteboard.general.containsType(UIPasteboard.ContentType.plainText)){
|
|
622
622
|
var text = UIPasteboard.general.stringForType(UIPasteboard.ContentType.plainText);
|
|
623
|
-
|
|
623
|
+
if (text !== null){
|
|
624
|
+
this.insertText(text);
|
|
625
|
+
}
|
|
624
626
|
}
|
|
625
627
|
},
|
|
626
628
|
|