summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp2
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp60
3 files changed, 57 insertions, 7 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 24ccfb501..27395ad5c 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake)
QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR
load(qt_build_config)
-MODULE_VERSION = 5.4.1
+MODULE_VERSION = 5.4.2
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
index dafb0e287..f4d7f0572 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -837,7 +837,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
innerNode->ref();
innerNonSharedNode = hitTest.innerNonSharedNode();
innerNonSharedNode->ref();
- boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : IntRect();
+ boundingRect = (innerNonSharedNode && innerNonSharedNode->renderer())? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : IntRect();
WebCore::Image *img = hitTest.image();
if (img) {
QPixmap* pix = img->nativeImageForCurrentFrame();
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index f798aff3b..613c1ac56 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -949,13 +949,14 @@ QPalette QWebPage::palette() const
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
- if (handleShortcutOverrideEvent(event))
- return;
+ if (handleShortcutOverrideEvent(event)) {
+ if (event->isAccepted())
+ return;
#ifndef QT_NO_SHORTCUT
- if (editorActionForKeyEvent(event) != QWebPage::NoWebAction)
- event->accept();
+ else if (editorActionForKeyEvent(event) != QWebPage::NoWebAction)
+ event->accept();
#endif
-
+ }
}
bool QWebPagePrivate::gestureEvent(QGestureEvent* event)
@@ -1213,6 +1214,48 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
\value WebModalDialog The window acts as modal dialog.
*/
+/*!
+ \enum QWebPage::PermissionPolicy
+
+ This enum describes the permission policies that the user may set for data or device access.
+
+ \value PermissionUnknown It is unknown whether the user grants or denies permission.
+ \value PermissionGrantedByUser The user has granted permission.
+ \value PermissionDeniedByUser The user has denied permission.
+
+ \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), Feature
+*/
+
+/*!
+ \enum QWebPage::Feature
+
+ This enum describes the platform feature access categories that the user may be asked to grant or deny access to.
+
+ \value Notifications Access to notifications
+ \value Geolocation Access to location hardware or service
+
+ \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), PermissionPolicy
+
+*/
+
+/*!
+ \fn void QWebPage::featurePermissionRequested(QWebFrame* frame, QWebPage::Feature feature);
+
+ This is signal is emitted when the given \a frame requests to make use of
+ the resource or device identified by \a feature.
+
+ \sa featurePermissionRequestCanceled(), setFeaturePermission()
+*/
+
+/*!
+ \fn void QWebPage::featurePermissionRequestCanceled(QWebFrame* frame, QWebPage::Feature feature);
+
+ This is signal is emitted when the given \a frame cancels a previously issued
+ request to make use of \a feature.
+
+ \sa featurePermissionRequested(), setFeaturePermission()
+
+*/
/*!
\class QWebPage::ViewportAttributes
@@ -1614,6 +1657,13 @@ bool QWebPage::shouldInterruptJavaScript()
#endif
}
+/*!
+ \fn void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, PermissionPolicy policy)
+
+ Sets the permission for the given \a frame to use \a feature to \a policy.
+
+ \sa featurePermissionRequested(), featurePermissionRequestCanceled()
+*/
void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, PermissionPolicy policy)
{
#if !ENABLE(NOTIFICATIONS) && !ENABLE(LEGACY_NOTIFICATIONS) && !ENABLE(GEOLOCATION)