提交 76a38849 编写于 作者: I isidor

Merge branch 'master' into isidorn/next

===================BEGIN GENERATOR LOG
===================END GENERATOR LOG
microsoft-vscode
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
......@@ -13,7 +15,7 @@ This project incorporates components from the projects listed below. The origina
6. atom/language-objective-c (https://github.com/atom/language-objective-c)
7. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass)
8. atom/language-xml (https://github.com/atom/language-xml)
9. Benvie/JavaScriptNext.tmLanguage (https://github.com/Benvie/JavaScriptNext.tmLanguage)
9. Benvie/JavaScriptNext.tmLanguage (https://github.com/Microsoft/vscode-JSON.tmLanguage)
10. chjj-marked version 0.3.6 (https://github.com/npmcomponent/chjj-marked)
11. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme)
12. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes)
......@@ -22,45 +24,46 @@ This project incorporates components from the projects listed below. The origina
15. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped)
16. demyte/language-cshtml (https://github.com/demyte/language-cshtml)
17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage)
18. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
19. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
20. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
21. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
22. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
23. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
24. language-docker (https://github.com/moby/moby)
25. language-go version 0.39.0 (https://github.com/atom/language-go)
26. language-less (https://github.com/atom/language-less)
27. language-php (https://github.com/atom/language-php)
28. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust)
29. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
30. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
31. octicons-code version 3.1.0 (https://octicons.github.com)
32. octicons-font version 3.1.0 (https://octicons.github.com)
33. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
34. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
35. string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
36. sublimehq/Packages (https://github.com/sublimehq/Packages)
37. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
38. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
39. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
40. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
41. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
42. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
43. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
44. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
45. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
46. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
47. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle)
48. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
49. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
50. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle)
51. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
52. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle)
53. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle)
54. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
55. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
56. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
18. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation)
19. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift)
20. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/)
21. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site)
22. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar)
23. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify)
24. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
25. language-docker (https://github.com/moby/moby)
26. language-go version 0.39.0 (https://github.com/atom/language-go)
27. language-less (https://github.com/atom/language-less)
28. language-php (https://github.com/atom/language-php)
29. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust)
30. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython)
31. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage)
32. octicons-code version 3.1.0 (https://octicons.github.com)
33. octicons-font version 3.1.0 (https://octicons.github.com)
34. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
35. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
36. string_scorer version 0.1.20 (https://github.com/joshaven/string_score)
37. sublimehq/Packages (https://github.com/sublimehq/Packages)
38. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell)
39. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
40. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
41. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
42. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
43. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
44. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
45. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
46. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
47. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
48. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle)
49. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
50. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
51. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle)
52. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
53. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle)
54. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle)
55. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
56. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage)
57. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
%% atom/language-c NOTICES AND INFORMATION BEGIN HERE
......@@ -608,6 +611,32 @@ SOFTWARE.
=========================================
END OF dotnet/csharp-tmLanguage NOTICES AND INFORMATION
%% expand-abbreviation NOTICES AND INFORMATION BEGIN HERE
=========================================
MIT License
Copyright (c) 2017 Emmet.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=========================================
END OF expand-abbreviation NOTICES AND INFORMATION
%% freebroccolo/atom-language-swift NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
......
......@@ -6,4 +6,32 @@
"repositoryURL": "https://github.com/atom/language-css",
"description": "The file syntaxes/css.tmLanguage.json was derived from the Atom package https://github.com/atom/language-css which was originally converted from the TextMate bundle https://github.com/textmate/css.tmbundle."
}]
},
{
"isLicense": true,
"name": "color-convert",
"repositoryURL": "https+ssh://git@github.com/harthur/color-convert",
"license": "MIT",
"licenseDetail": [
"Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>",
"",
"Permission is hereby granted, free of charge, to any person obtaining",
"a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including",
"without limitation the rights to use, copy, modify, merge, publish,",
"distribute, sublicense, and/or sell copies of the Software, and to",
"permit persons to whom the Software is furnished to do so, subject to",
"the following conditions:",
"",
"The above copyright notice and this permission notice shall be",
"included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
"NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE",
"LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION",
"OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION",
"WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
}
]
......@@ -3,9 +3,9 @@
"version": "0.0.1",
"dependencies": {
"@emmetio/css-parser": {
"version": "0.3.0",
"from": "@emmetio/css-parser@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.3.0.tgz"
"version": "0.4.0",
"from": "@emmetio/css-parser@>=0.4.0 <0.5.0",
"resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.4.0.tgz"
},
"@emmetio/extract-abbreviation": {
"version": "0.1.2",
......
......@@ -205,7 +205,7 @@
"dependencies": {
"@emmetio/html-matcher": "^0.3.1",
"@emmetio/css-parser": "^0.3.0",
"@emmetio/css-parser": "^0.4.0",
"@emmetio/math-expression": "^0.1.1",
"vscode-emmet-helper": "^1.0.10",
"vscode-languageserver-types": "^3.0.3",
......
......@@ -23,5 +23,9 @@
["\"", "\""],
["'", "'"],
["`", "`"]
]
],
"indentationRules": {
"increaseIndentPattern": "^.*(\\bcase\\b.*:|\\bdefault\\b:|(\\b(func|if|else|switch|select|for|struct)\\b.*)?{[^}]*|\\([^)]*)$",
"decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[),]?|\\)[,]?)$"
}
}
\ No newline at end of file
......@@ -3,5 +3,5 @@
"name": "Benvie/JavaScriptNext.tmLanguage",
"version": "0.0.0",
"license": "MIT",
"repositoryURL": "https://github.com/Benvie/JavaScriptNext.tmLanguage"
"repositoryURL": "https://github.com/Microsoft/vscode-JSON.tmLanguage"
}]
\ No newline at end of file
......@@ -157,7 +157,7 @@
}
}
if (document.readyState === 'loading') {
if (document.readyState === 'loading' || document.readyState === 'uninitialized') {
document.addEventListener('DOMContentLoaded', onLoad);
} else {
onLoad();
......
......@@ -2,7 +2,7 @@
"name": "code-oss-dev",
"version": "1.15.0",
"electronVersion": "1.6.6",
"distro": "4bec0ed99ee450bfbefa4baf2433c6a032e88bd4",
"distro": "ff145171d1200edd43f053ec353f513435914b5f",
"author": {
"name": "Microsoft Corporation"
},
......
......@@ -20,6 +20,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
import { MenuRegistry } from "vs/platform/actions/common/actions";
import { WebviewElement } from "vs/workbench/parts/html/browser/webview";
import { IExtensionsWorkbenchService } from "vs/workbench/parts/extensions/common/extensions";
function getActivePreviewsForResource(accessor: ServicesAccessor, resource: URI | string) {
const uri = resource instanceof URI ? resource : URI.parse(resource);
......@@ -65,9 +66,13 @@ CommandsRegistry.registerCommand('_workbench.previewHtml', function (
}
}
const inputOptions = (Object as any).assign({}, options || defaultPreviewHtmlOptions);
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
inputOptions.svgWhiteList = extensionsWorkbenchService.allowedBadgeProviders;
// Otherwise, create new input and open it
if (!input) {
input = accessor.get(IInstantiationService).createInstance(HtmlInput, label, '', uri, options || defaultPreviewHtmlOptions);
input = accessor.get(IInstantiationService).createInstance(HtmlInput, label, '', uri, inputOptions);
} else {
input.setName(label); // make sure to use passed in label
}
......@@ -77,7 +82,11 @@ CommandsRegistry.registerCommand('_workbench.previewHtml', function (
.then(editor => true);
});
CommandsRegistry.registerCommand('_workbench.htmlPreview.postMessage', (accessor: ServicesAccessor, resource: URI | string, message: any) => {
CommandsRegistry.registerCommand('_workbench.htmlPreview.postMessage', function (
accessor: ServicesAccessor,
resource: URI | string,
message: any
) {
const activePreviews = getActivePreviewsForResource(accessor, resource);
for (const preview of activePreviews) {
preview.sendMessage(message);
......@@ -85,7 +94,17 @@ CommandsRegistry.registerCommand('_workbench.htmlPreview.postMessage', (accessor
return activePreviews.length > 0;
});
CommandsRegistry.registerCommand('_workbench.htmlPreview.updateOptions', (accessor: ServicesAccessor, resource: URI | string, options: HtmlInputOptions) => {
CommandsRegistry.registerCommand('_workbench.htmlPreview.updateOptions', function (
accessor: ServicesAccessor,
resource: URI | string,
options: HtmlInputOptions
) {
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
const inputOptions: HtmlInputOptions = options;
const allowedBadgeProviders = extensionsWorkbenchService.allowedBadgeProviders;
inputOptions.svgWhiteList = allowedBadgeProviders;
const uri = resource instanceof URI ? resource : URI.parse(resource);
const activePreviews = getActivePreviewsForResource(accessor, resource);
for (const preview of activePreviews) {
......
......@@ -178,7 +178,7 @@ export class HtmlPreviewPart extends WebviewEditor {
public setInput(input: EditorInput, options?: EditorOptions): TPromise<void> {
if (this.input && this.input.matches(input) && this._hasValidModel()) {
if (this.input && this.input.matches(input) && this._hasValidModel() && this.input instanceof HtmlInput && input instanceof HtmlInput && areHtmlInputOptionsEqual(this.input.options, input.options)) {
return TPromise.as(undefined);
}
......
......@@ -162,18 +162,15 @@
var setInitialScrollPosition;
if (firstLoad) {
firstLoad = false;
setInitialScrollPosition = function (body, window) {
body.scrollTop = 0;
setInitialScrollPosition = function (body) {
if (!isNaN(initData.initialScrollProgress)) {
window.addEventListener('load', function () {
if (body.scrollTop === 0) {
body.scrollTop = body.clientHeight * initData.initialScrollProgress;
}
});
if (body.scrollTop === 0) {
body.scrollTop = body.clientHeight * initData.initialScrollProgress;
}
}
};
} else {
const scrollY = frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0;
const scrollY = frame && frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0;
setInitialScrollPosition = function (body) {
if (body.scrollTop === 0) {
body.scrollTop = scrollY;
......@@ -207,7 +204,7 @@
if (contentDocument.body) {
// Workaround for https://github.com/Microsoft/vscode/issues/12865
// check new scrollTop and reset if neccessary
setInitialScrollPosition(contentDocument.body, contentWindow);
setInitialScrollPosition(contentDocument.body);
// Bubble out link clicks
contentDocument.body.addEventListener('click', handleInnerClick);
......
......@@ -12,6 +12,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService';
export interface HtmlInputOptions {
allowScripts?: boolean;
allowSvgs?: boolean;
svgWhiteList?: string[];
}
export function areHtmlInputOptionsEqual(left: HtmlInputOptions, right: HtmlInputOptions) {
......@@ -28,12 +29,4 @@ export class HtmlInput extends ResourceEditorInput {
) {
super(name, description, resource, textModelResolverService);
}
public matches(otherInput: any): boolean {
if (!super.matches(otherInput)) {
return false;
}
return otherInput instanceof HtmlInput && areHtmlInputOptionsEqual(this.options, otherInput.options);
}
}
......@@ -692,15 +692,17 @@ class AbsoluteAndRelativeParsedExpression {
private init(expr: glob.IExpression): void {
let absoluteGlobExpr: glob.IExpression;
let relativeGlobExpr: glob.IExpression;
Object.keys(expr).forEach(key => {
if (path.isAbsolute(key)) {
absoluteGlobExpr = absoluteGlobExpr || glob.getEmptyExpression();
absoluteGlobExpr[key] = true;
} else {
relativeGlobExpr = relativeGlobExpr || glob.getEmptyExpression();
relativeGlobExpr[key] = true;
}
});
Object.keys(expr)
.filter(key => expr[key])
.forEach(key => {
if (path.isAbsolute(key)) {
absoluteGlobExpr = absoluteGlobExpr || glob.getEmptyExpression();
absoluteGlobExpr[key] = true;
} else {
relativeGlobExpr = relativeGlobExpr || glob.getEmptyExpression();
relativeGlobExpr[key] = true;
}
});
this.absoluteParsedExpr = absoluteGlobExpr && glob.parse(absoluteGlobExpr, { trimForExclusions: true });
this.relativeParsedExpr = relativeGlobExpr && glob.parse(relativeGlobExpr, { trimForExclusions: true });
......
......@@ -373,7 +373,7 @@ function foldersToRgExcludeGlobs(folderQueries: IFolderSearch[], globalExclude:
const globArgs: string[] = [];
let siblingClauses: glob.IExpression = {};
folderQueries.forEach(folderQuery => {
const totalExcludePattern = objects.assign({}, globalExclude || {}, folderQuery.excludePattern || {});
const totalExcludePattern = objects.assign({}, folderQuery.excludePattern || {}, globalExclude || {});
const result = globExprsToRgGlobs(totalExcludePattern, folderQuery.folder);
globArgs.push(...result.globArgs);
if (result.siblingClauses) {
......
......@@ -59,8 +59,6 @@ export class SearchService implements ISearchService {
}
public search(query: ISearchQuery): PPromise<ISearchComplete, ISearchProgressItem> {
this.extendQuery(query);
let rawSearchQuery: PPromise<void, ISearchProgressItem>;
return new PPromise<ISearchComplete, ISearchProgressItem>((onComplete, onError, onProgress) => {
......
......@@ -245,6 +245,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
themeData = createUnloadedTheme(isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME);
}
themeData.setCustomColors(this.colorCustomizations);
themeData.setCustomTokenColors(this.tokenColorCustomizations);
this.updateDynamicCSSRules(themeData);
this.applyTheme(themeData, null, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册