mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-08 07:44:33 +01:00
make sure to respect attachCSS setting for integrated browser (#296210)
make sure to respect attachCSS setting
This commit is contained in:
@@ -718,12 +718,14 @@ export class BrowserEditor extends EditorPane {
|
||||
name: displayName,
|
||||
fullName: displayName,
|
||||
value: value,
|
||||
modelDescription: 'Structured browser element context with HTML path, attributes, and computed styles.',
|
||||
modelDescription: attachCss
|
||||
? 'Structured browser element context with HTML path, attributes, and computed styles.'
|
||||
: 'Structured browser element context with HTML path and attributes.',
|
||||
kind: 'element',
|
||||
icon: ThemeIcon.fromId(Codicon.layout.id),
|
||||
ancestors: elementData.ancestors,
|
||||
attributes: elementData.attributes,
|
||||
computedStyles: elementData.computedStyles,
|
||||
computedStyles: attachCss ? elementData.computedStyles : undefined,
|
||||
dimensions: elementData.dimensions,
|
||||
innerText: elementData.innerText,
|
||||
});
|
||||
@@ -864,9 +866,11 @@ export class BrowserEditor extends EditorPane {
|
||||
sections.push(`Attributes:\n${attributeTable}`);
|
||||
}
|
||||
|
||||
const computedStyleTable = this.formatElementMap(elementData.computedStyles);
|
||||
if (computedStyleTable) {
|
||||
sections.push(`Computed Styles:\n${computedStyleTable}`);
|
||||
if (attachCss) {
|
||||
const computedStyleTable = this.formatElementMap(elementData.computedStyles);
|
||||
if (computedStyleTable) {
|
||||
sections.push(`Computed Styles:\n${computedStyleTable}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (elementData.dimensions) {
|
||||
|
||||
@@ -300,7 +300,7 @@ class SimpleBrowserOverlayWidget {
|
||||
icon: ThemeIcon.fromId(Codicon.layout.id),
|
||||
ancestors: elementData.ancestors,
|
||||
attributes: elementData.attributes,
|
||||
computedStyles: elementData.computedStyles,
|
||||
computedStyles: attachCss ? elementData.computedStyles : undefined,
|
||||
dimensions: elementData.dimensions,
|
||||
innerText: elementData.innerText,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user