Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Web Inspector: Use save sheet instead of dialog where possible
https://bugs.webkit.org/show_bug.cgi?id=193160
<rdar://problem/37399759>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2019-01-04
Reviewed by Devin Rousso.

Source/WebKit:

* UIProcess/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformSave):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):

Canonical link: https://commits.webkit.org/207675@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Jan 5, 2019
1 parent cadd62d commit 06d152e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
13 changes: 13 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,16 @@
2019-01-04 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Use save sheet instead of dialog where possible
https://bugs.webkit.org/show_bug.cgi?id=193160
<rdar://problem/37399759>

Reviewed by Devin Rousso.

* UIProcess/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformSave):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):

2019-01-04 Jer Noble <jer.noble@apple.com>

[WebKitLegacy] Media playback pauses on scroll
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm
Expand Up @@ -180,8 +180,9 @@ - (BOOL)inspectorViewControllerInspectorIsUnderTest:(WKInspectorViewController *
saveToURL(panel.URL);
};

if (m_window)
[panel beginSheetModalForWindow:m_window.get() completionHandler:completionHandler];
NSWindow *window = m_window ? m_window.get() : [NSApp keyWindow];
if (window)
[panel beginSheetModalForWindow:window completionHandler:completionHandler];
else
completionHandler([panel runModal]);
}
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm
Expand Up @@ -494,8 +494,9 @@ - (void)inspectorViewControllerDidMoveToWindow:(WKInspectorViewController *)insp
saveToURL(panel.URL);
};

if (m_inspectorWindow)
[panel beginSheetModalForWindow:m_inspectorWindow.get() completionHandler:completionHandler];
NSWindow *window = m_inspectorWindow ? m_inspectorWindow.get() : [NSApp keyWindow];
if (window)
[panel beginSheetModalForWindow:window completionHandler:completionHandler];
else
completionHandler([panel runModal]);
}
Expand Down
11 changes: 11 additions & 0 deletions Source/WebKitLegacy/mac/ChangeLog
@@ -1,3 +1,14 @@
2019-01-04 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Use save sheet instead of dialog where possible
https://bugs.webkit.org/show_bug.cgi?id=193160
<rdar://problem/37399759>

Reviewed by Devin Rousso.

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):

2019-01-04 Wenson Hsieh <wenson_hsieh@apple.com>

[Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
Expand Up @@ -374,8 +374,9 @@ - (void)destroyInspectorView;
};

NSWindow *frontendWindow = [[m_frontendWindowController frontendWebView] window];
if (frontendWindow)
[panel beginSheetModalForWindow:frontendWindow completionHandler:completionHandler];
NSWindow *window = frontendWindow ? frontendWindow : [NSApp keyWindow];
if (window)
[panel beginSheetModalForWindow:window completionHandler:completionHandler];
else
completionHandler([panel runModal]);
}
Expand Down

0 comments on commit 06d152e

Please sign in to comment.