Commit Graph

18 Commits

Author SHA1 Message Date
Matt Bierner
9847783f62 Remove uuid from webview resource uris
This is no longer be needed. We still serve the webview code itself from a unique subdomain

This also removes the need for `serviceWorkerFetchIgnoreSubdomain`
2021-05-21 09:28:43 -07:00
Matt Bierner
07a2aab8f2 Remove duplication around checking isRemote 2021-05-20 16:00:40 -07:00
Matt Bierner
18ea5ac15e Use isRemote instead of remote authority to determine where to load from 2021-05-20 11:30:43 -07:00
Matt Bierner
2270c36cff Use extension location instead of remote for asWebviewUri 2021-05-20 10:32:47 -07:00
Matt Bierner
1ddc623e58 Simplify logic for webview resource uris (#123740)
* Simplify logic for webview resource uris

This change attempts to simplify the logic around webview resource uris by doing the following:

- Hard code the resource origin. We always will be hitting a service worker for these paths so they don't need to be dynamic (although in the future we may want to pull them from `product.json`)

    This lets us remove these properties from the environment service

- Move remote handling from the resource loader in `asWebviewUri`.

- Remove the handling of http and https paths from the resource loader.

    I don't think these cases can be hit any longer (although I need to confirm this with more testing for the web case). Instead I added a check to `asWebviewUri` so that we return the original uri if a http(s) uri is passed in

* Restore normalizeResourcePath

We still need to convert between a remote uri and one that our remote file system can read

* Fix test

* Restore passing in remote on extension side

* Remove only
2021-05-19 17:26:51 -07:00
Johannes Rieken
a60beb9d7a don't leak proxies in editor land, also remove indentSize property which isn't API 2021-02-01 12:01:50 +01:00
Johannes Rieken
28cb90be8c chore - ES6, use for-of instead of forEach 2020-06-12 16:20:23 +02:00
Matt Bierner
1b70625f8c Use import type when importing vscode under src
When the core references `vscode`, we only want to import the types and never generate a real import (which will fail to load). Use `import type` to better enforce this
2020-01-10 14:25:21 -08:00
Matt Bierner
c5dc9d16be Finalize asWebviewUri api
Fixes #79242

As discussed, renames `toWebviewResource` to `asWebviewUri` to be consistent with the `asAbsolutePath` api naming
2019-08-19 20:18:26 -07:00
Johannes Rieken
06701f533d add a bunch of strict field initializations 2019-07-31 12:30:30 +02:00
Matt Bierner
c01a3a718d Use clearer name for csp webview element
#76489
2019-07-09 11:45:20 -07:00
Matt Bierner
f963c9a2a8 Adding tests and changing how toWebviewResource works
- Allow placeholders in the webviewEndpoint. This is required to support serving each webview from its own origin
- Add tests for toWebviewResource
2019-07-09 11:45:10 -07:00
Matt Bierner
a558a9504a Adding toWebviewResource api
For #76489
2019-07-08 18:38:47 -07:00
Matt Bierner
8119b4aee7 Move the webviewResourceRoot property to be set on each webview instead of as a global property
For #72155

This allows  us to potentially change the resource root per webview
2019-06-24 17:07:06 -07:00
Johannes Rieken
422fd46b94 implements ExtHostEditorInsetsShape 2019-06-24 10:36:10 +02:00
Johannes Rieken
5c3bab92ac more code insets API tweaks, #66418 2019-06-20 10:30:25 +02:00
Johannes Rieken
1ad12b24a6 allow extension resources in editor insets 2019-06-12 18:09:34 +02:00
Johannes Rieken
6f1da34c2e debt - decouple webviews from code insets, move things to /browser/-layer, change inset api proposal to push style, re #66418 2019-06-04 12:31:18 +02:00