Skip to content

Commit

Permalink
[GTK] Undeprecate and document webkit_print_operation_print() behavior
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=274456

Reviewed by Carlos Garcia Campos.

Turns out, there might be legitimate use cases for webkit_print_operation_print()
for sandboxed apps. However, they're very specific, and this function only works
in very specific situations.

Document that, and undeprecate the function.

* Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp:
* Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.h.in:

Canonical link: https://commits.webkit.org/279054@main
  • Loading branch information
GeorgesStavracas committed May 21, 2024
1 parent 7db8345 commit 041231a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ static GRefPtr<GtkPrinter> printerFromSettingsOrDefault(GtkPrintSettings* settin
* operation finishes. If an error occurs while printing the signal
* #WebKitPrintOperation::failed is emitted before #WebKitPrintOperation::finished.
*
* Deprecated: 2.46. This function does nothing if the app is sandboxed.
* If the app is running in a sandbox, this function only works if printing to
* a file that is in a location accessible to the sandbox, usually acquired
* through the File Chooser portal. This function will not work for physical
* printers when running in a sandbox.
*/
void webkit_print_operation_print(WebKitPrintOperation* printOperation)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ WEBKIT_API WebKitPrintOperationResponse
webkit_print_operation_run_dialog (WebKitPrintOperation *print_operation,
GtkWindow *parent);

WEBKIT_DEPRECATED void
WEBKIT_API void
webkit_print_operation_print (WebKitPrintOperation *print_operation);

G_END_DECLS
Expand Down

0 comments on commit 041231a

Please sign in to comment.