@breakside/jskit 2023.17.0 → 2023.18.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/JSBundle.js +16 -1
- package/Frameworks/Foundation.jsframework/JS/JSImage.js +13 -2
- package/Frameworks/Foundation.jsframework/JS/JSXMLParser.js +13 -5
- 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/Resources.js +1 -10
- 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/JSBundle.js +16 -1
- package/Root/Frameworks/Foundation/JSImage.js +13 -2
- package/Root/Frameworks/Foundation/JSXMLParser.js +13 -5
- 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/UIHTMLOpenPanel.js +17 -3
- package/Root/Frameworks/UIKit/UIWindowServer.js +3 -3
- 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": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
13
13
|
}
|
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
// #import "JSObject.js"
|
|
17
17
|
// #import "JSLocale.js"
|
|
18
18
|
// #import "JSFile.js"
|
|
19
|
+
// #import "JSLog.js"
|
|
19
20
|
'use strict';
|
|
20
21
|
|
|
22
|
+
(function(){
|
|
23
|
+
|
|
24
|
+
var logger = JSLog("foundation", "bundle");
|
|
25
|
+
|
|
21
26
|
JSClass('JSBundle', JSObject, {
|
|
22
27
|
|
|
23
28
|
_dict: null,
|
|
@@ -252,6 +257,14 @@ JSClass('JSBundle', JSObject, {
|
|
|
252
257
|
if (metadata !== null){
|
|
253
258
|
return metadata.strings[key];
|
|
254
259
|
}
|
|
260
|
+
var langs;
|
|
261
|
+
if (locale){
|
|
262
|
+
langs = this._getSupportedLanguagesForLocaleIdentifiers([locale.identifier]);
|
|
263
|
+
}else{
|
|
264
|
+
this._updateSupportedUserLanguagesIfNeeded();
|
|
265
|
+
langs = this._supportedPreferredLanguages;
|
|
266
|
+
}
|
|
267
|
+
logger.warn("Missing localization key '%{public}' in %{public} for %{public}", key, table, langs.join(","));
|
|
255
268
|
return key;
|
|
256
269
|
},
|
|
257
270
|
|
|
@@ -312,4 +325,6 @@ Object.defineProperty(JSBundle, 'mainBundle', {
|
|
|
312
325
|
});
|
|
313
326
|
return bundle;
|
|
314
327
|
}
|
|
315
|
-
});
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
})();
|
|
@@ -314,8 +314,19 @@ JSImage.contentTypeOfData = function(data){
|
|
|
314
314
|
return JSMediaType("image/png");
|
|
315
315
|
}else if (data.length > 2 && data[0] == 0xFF && data[1] == 0xD8){
|
|
316
316
|
return JSMediaType("image/jpeg");
|
|
317
|
-
}else if (data.length >
|
|
318
|
-
|
|
317
|
+
}else if (data.length > 0 && data[0] == 0x3C){
|
|
318
|
+
var parser = JSXMLParser.initWithData(data);
|
|
319
|
+
var contentType = null;
|
|
320
|
+
parser.delegate = {
|
|
321
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
322
|
+
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
323
|
+
contentType = JSMediaType("image/svg+xml");
|
|
324
|
+
}
|
|
325
|
+
parser.stop();
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
parser.parse();
|
|
329
|
+
return contentType;
|
|
319
330
|
}
|
|
320
331
|
return null;
|
|
321
332
|
};
|
|
@@ -362,13 +362,21 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
362
362
|
var obj;
|
|
363
363
|
if (isHTML){
|
|
364
364
|
readWhitespace();
|
|
365
|
-
}else{
|
|
366
|
-
obj = readObject();
|
|
367
|
-
if (obj === null || obj.kind != 'PI' || obj.name != 'xml'){
|
|
368
|
-
throw new Error("Expecting <?xml at start of document");
|
|
369
|
-
}
|
|
370
365
|
}
|
|
371
366
|
obj = readObject();
|
|
367
|
+
if (!isHTML){
|
|
368
|
+
if (obj === null){
|
|
369
|
+
throw new Error("Expecting XML prolog or root element");
|
|
370
|
+
}
|
|
371
|
+
if (obj.kind === "PI"){
|
|
372
|
+
if (obj.name != 'xml'){
|
|
373
|
+
throw new Error("Expecting XML prolog");
|
|
374
|
+
}
|
|
375
|
+
obj = readObject();
|
|
376
|
+
}else if (obj.kind !== "ElementStart"){
|
|
377
|
+
throw new Error("Expecting XML root element");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
372
380
|
var elementStack = [];
|
|
373
381
|
var namespaces = {
|
|
374
382
|
':default:': null,
|
|
@@ -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": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
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": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
12
12
|
}
|
package/Node/Resources.js
CHANGED
|
@@ -370,19 +370,10 @@ var addMetadata = {
|
|
|
370
370
|
},
|
|
371
371
|
|
|
372
372
|
'.svg': async function(name, contents, metadata){
|
|
373
|
-
var xml = contents.stringByDecodingUTF8();
|
|
374
|
-
// SVG icons from fontawesome don't start with xml prologue, so
|
|
375
|
-
// add one if it looks to be missing
|
|
376
|
-
if (xml.startsWith("<svg ")){
|
|
377
|
-
xml = '<?xml version="1.0" encoding="utf-8"?>\n' + xml;
|
|
378
|
-
}
|
|
379
|
-
if (!xml.startsWith("<?xml")){
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
373
|
metadata.image = {
|
|
383
374
|
vector: true
|
|
384
375
|
};
|
|
385
|
-
var parser = JSXMLParser.
|
|
376
|
+
var parser = JSXMLParser.initWithData(contents);
|
|
386
377
|
parser.delegate = {
|
|
387
378
|
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
388
379
|
var multiple = {
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.18.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": "e7355f52684cb42e4f6903552340ad3fd8e3e502"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -16,8 +16,13 @@
|
|
|
16
16
|
// #import "JSObject.js"
|
|
17
17
|
// #import "JSLocale.js"
|
|
18
18
|
// #import "JSFile.js"
|
|
19
|
+
// #import "JSLog.js"
|
|
19
20
|
'use strict';
|
|
20
21
|
|
|
22
|
+
(function(){
|
|
23
|
+
|
|
24
|
+
var logger = JSLog("foundation", "bundle");
|
|
25
|
+
|
|
21
26
|
JSClass('JSBundle', JSObject, {
|
|
22
27
|
|
|
23
28
|
_dict: null,
|
|
@@ -252,6 +257,14 @@ JSClass('JSBundle', JSObject, {
|
|
|
252
257
|
if (metadata !== null){
|
|
253
258
|
return metadata.strings[key];
|
|
254
259
|
}
|
|
260
|
+
var langs;
|
|
261
|
+
if (locale){
|
|
262
|
+
langs = this._getSupportedLanguagesForLocaleIdentifiers([locale.identifier]);
|
|
263
|
+
}else{
|
|
264
|
+
this._updateSupportedUserLanguagesIfNeeded();
|
|
265
|
+
langs = this._supportedPreferredLanguages;
|
|
266
|
+
}
|
|
267
|
+
logger.warn("Missing localization key '%{public}' in %{public} for %{public}", key, table, langs.join(","));
|
|
255
268
|
return key;
|
|
256
269
|
},
|
|
257
270
|
|
|
@@ -312,4 +325,6 @@ Object.defineProperty(JSBundle, 'mainBundle', {
|
|
|
312
325
|
});
|
|
313
326
|
return bundle;
|
|
314
327
|
}
|
|
315
|
-
});
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
})();
|
|
@@ -314,8 +314,19 @@ JSImage.contentTypeOfData = function(data){
|
|
|
314
314
|
return JSMediaType("image/png");
|
|
315
315
|
}else if (data.length > 2 && data[0] == 0xFF && data[1] == 0xD8){
|
|
316
316
|
return JSMediaType("image/jpeg");
|
|
317
|
-
}else if (data.length >
|
|
318
|
-
|
|
317
|
+
}else if (data.length > 0 && data[0] == 0x3C){
|
|
318
|
+
var parser = JSXMLParser.initWithData(data);
|
|
319
|
+
var contentType = null;
|
|
320
|
+
parser.delegate = {
|
|
321
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
322
|
+
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
323
|
+
contentType = JSMediaType("image/svg+xml");
|
|
324
|
+
}
|
|
325
|
+
parser.stop();
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
parser.parse();
|
|
329
|
+
return contentType;
|
|
319
330
|
}
|
|
320
331
|
return null;
|
|
321
332
|
};
|
|
@@ -362,13 +362,21 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
362
362
|
var obj;
|
|
363
363
|
if (isHTML){
|
|
364
364
|
readWhitespace();
|
|
365
|
-
}else{
|
|
366
|
-
obj = readObject();
|
|
367
|
-
if (obj === null || obj.kind != 'PI' || obj.name != 'xml'){
|
|
368
|
-
throw new Error("Expecting <?xml at start of document");
|
|
369
|
-
}
|
|
370
365
|
}
|
|
371
366
|
obj = readObject();
|
|
367
|
+
if (!isHTML){
|
|
368
|
+
if (obj === null){
|
|
369
|
+
throw new Error("Expecting XML prolog or root element");
|
|
370
|
+
}
|
|
371
|
+
if (obj.kind === "PI"){
|
|
372
|
+
if (obj.name != 'xml'){
|
|
373
|
+
throw new Error("Expecting XML prolog");
|
|
374
|
+
}
|
|
375
|
+
obj = readObject();
|
|
376
|
+
}else if (obj.kind !== "ElementStart"){
|
|
377
|
+
throw new Error("Expecting XML root element");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
372
380
|
var elementStack = [];
|
|
373
381
|
var namespaces = {
|
|
374
382
|
':default:': null,
|
|
@@ -25,8 +25,14 @@ JSClass("UIHTMLOpenPanel", UIOpenPanel, {
|
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
show: function(action, target){
|
|
28
|
-
|
|
28
|
+
if (UIHTMLOpenPanel.fileInput !== null){
|
|
29
|
+
UIHTMLOpenPanel.fileInput.parentNode.removeChild(UIHTMLOpenPanel.fileInput);
|
|
30
|
+
}
|
|
31
|
+
UIHTMLOpenPanel.fileInput = document.createElement('input');
|
|
32
|
+
var fileInput = UIHTMLOpenPanel.fileInput;
|
|
29
33
|
fileInput.type = 'file';
|
|
34
|
+
fileInput.style.display = 'none';
|
|
35
|
+
document.body.appendChild(fileInput);
|
|
30
36
|
if (this.allowsMultipleSelection){
|
|
31
37
|
fileInput.multiple = true;
|
|
32
38
|
}
|
|
@@ -38,7 +44,7 @@ JSClass("UIHTMLOpenPanel", UIOpenPanel, {
|
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
var panel = this;
|
|
41
|
-
fileInput.
|
|
47
|
+
fileInput.addEventListener("change", function(){
|
|
42
48
|
if (panel.allowsMultipleSelection || panel.chooseDirectories){
|
|
43
49
|
if (fileInput.webkitEntries && fileInput.webkitEntries.length > 0){
|
|
44
50
|
panel._fileEnumerator = JSHTMLFileSystemEntryFileEnumerator.initWithHTMLEntries(fileInput.webkitEntries);
|
|
@@ -51,12 +57,20 @@ JSClass("UIHTMLOpenPanel", UIOpenPanel, {
|
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
action.call(target, panel);
|
|
54
|
-
|
|
60
|
+
fileInput.parentNode.removeChild(fileInput);
|
|
61
|
+
UIHTMLOpenPanel.fileInput = null;
|
|
62
|
+
});
|
|
63
|
+
fileInput.addEventListener("cancel", function(){
|
|
64
|
+
fileInput.parentNode.removeChild(fileInput);
|
|
65
|
+
UIHTMLOpenPanel.fileInput = null;
|
|
66
|
+
});
|
|
55
67
|
fileInput.click();
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
});
|
|
59
71
|
|
|
72
|
+
UIHTMLOpenPanel.fileInput = null;
|
|
73
|
+
|
|
60
74
|
UIOpenPanel.definePropertiesFromExtensions({
|
|
61
75
|
init: function(){
|
|
62
76
|
return UIHTMLOpenPanel.init();
|
|
@@ -414,7 +414,7 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
414
414
|
var view = null;
|
|
415
415
|
if (window !== null){
|
|
416
416
|
view = window.hitTest(window.convertPointFromScreen(this.mouseLocation));
|
|
417
|
-
while (view !== null && view.tooltip === null){
|
|
417
|
+
while (view !== null && (view.tooltip === null || view.tooltip === "")){
|
|
418
418
|
view = view.superview;
|
|
419
419
|
}
|
|
420
420
|
if (view === this._tooltipSourceView){
|
|
@@ -705,10 +705,10 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
705
705
|
var window = this.windowForEventAtLocation(this.mouseLocation);
|
|
706
706
|
if (window !== null){
|
|
707
707
|
var view = window.hitTest(window.convertPointFromScreen(this.mouseLocation));
|
|
708
|
-
while (view !== null && view.tooltip === null){
|
|
708
|
+
while (view !== null && (view.tooltip === null || view.tooltip === "")){
|
|
709
709
|
view = view.superview;
|
|
710
710
|
}
|
|
711
|
-
if (view !== null && view.tooltip !== null){
|
|
711
|
+
if (view !== null && view.tooltip !== null && view.tooltip !== ""){
|
|
712
712
|
this.showTooltipForView(view, this.mouseLocation);
|
|
713
713
|
}
|
|
714
714
|
}
|