Preserve side-docked browser devtools layout on pane resize
This commit is contained in:
parent
0ca6569e00
commit
359ada8a3f
2 changed files with 6 additions and 7 deletions
|
|
@ -3786,8 +3786,7 @@ struct WebViewRepresentable: NSViewRepresentable {
|
|||
hostedWebView !== webView ||
|
||||
!hostedWebViewConstraints.isEmpty ||
|
||||
!webView.translatesAutoresizingMaskIntoConstraints ||
|
||||
webView.autoresizingMask != [.width, .height] ||
|
||||
webView.frame != container.bounds
|
||||
webView.autoresizingMask != [.width, .height]
|
||||
guard needsFrameHosting else {
|
||||
needsLayout = true
|
||||
layoutSubtreeIfNeeded()
|
||||
|
|
@ -3799,8 +3798,8 @@ struct WebViewRepresentable: NSViewRepresentable {
|
|||
hostedWebView = webView
|
||||
|
||||
// WebKit's attached inspector does not reliably dock into a constraint-managed
|
||||
// WKWebView hierarchy on macOS. Host the moved webview with autoresizing so
|
||||
// the inspector can resize the content view in place.
|
||||
// WKWebView hierarchy on macOS. Host the moved webview with autoresizing and
|
||||
// keep WebKit-owned page frames intact when DevTools is side-docked.
|
||||
webView.translatesAutoresizingMaskIntoConstraints = true
|
||||
webView.autoresizingMask = [.width, .height]
|
||||
webView.frame = container.bounds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue