summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/WidgetApi/qwebpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/qt/WidgetApi/qwebpage.cpp')
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index c2bc712e8..56ecaa0c1 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -1208,6 +1208,7 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
\value ToggleMediaPlayPause Toggles the play/pause state of the hovered audio or video element. (Added in Qt 5.2)
\value ToggleMediaMute Mutes or unmutes the hovered audio or video element. (Added in Qt 5.2)
\value ToggleVideoFullscreen Switches the hovered video element into or out of fullscreen mode. (Added in Qt 5.2)
+ \value RequestClose Request to close the web page. If defined, the window.onbeforeunload handler is run, and the user can confirm or reject to close the page. If the close request is confirmed, windowCloseRequested is emitted. (Added in ?)
\omitvalue WebActionCount
@@ -1835,6 +1836,12 @@ void QWebPage::triggerAction(WebAction action, bool)
it.next()->d->cancelLoad();
break;
}
+ case RequestClose: {
+ bool success = d->tryClosePage();
+ if (success)
+ emit windowCloseRequested();
+ break;
+ }
default:
command = QWebPagePrivate::editorCommandForWebActions(action);
break;