Skip to content

Remove some now redundant webview layout logic#313443

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/inquisitive-tuna
Apr 30, 2026
Merged

Remove some now redundant webview layout logic#313443
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/inquisitive-tuna

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Apr 30, 2026

The webview css anchor positioning should handle this all automatically now

The webview css anchor positioning should handle this all automatically now

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 05:59
@mjbvz mjbvz enabled auto-merge April 30, 2026 05:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes now-redundant layout/scroll-driven re-anchoring logic for overlay-based webviews and notebook overlays, relying on CSS anchor positioning to keep overlays aligned automatically.

Changes:

  • Remove WebviewViewPane.layoutBody override that re-laid out the webview on every view layout.
  • Remove WebviewEditor’s dimension tracking and editor-part scroll/group-change listeners used to re-set the webview anchor.
  • Remove notebook editor scroll listener that re-laid out the overlay container over the shadow element.
Show a summary per file
File Description
src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts Stops re-anchoring the webview on every layoutBody call; anchoring is now done during render/activation only.
src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts Removes layout- and editor-part-event-driven anchor updates and cached dimensions; anchoring happens when claiming the webview.
src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts Removes scroll-driven overlay re-layout for the notebook overlay container.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@mjbvz mjbvz merged commit d943811 into microsoft:main Apr 30, 2026
30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants