Title: [113183] trunk
- Revision
- 113183
- Author
- [email protected]
- Date
- 2012-04-04 06:35:33 -0700 (Wed, 04 Apr 2012)
Log Message
[Qt][WK2] QtWebKit2 should support Page Visibility API
https://bugs.webkit.org/show_bug.cgi?id=81164
Patch by Jesus Sanchez-Palencia <[email protected]> on 2012-04-04
Reviewed by Kenneth Rohde Christiansen.
Source/WebKit2:
Implementing the last bits needed for getting the expected
behavior for Page Visibility API, according to its spec.
The only missing part in Qt was a way to check whether
the view was exposed or not.
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewVisible):
Tools:
Enabling Page Visiblity API for Qt WebKit2.
* qmake/mkspecs/features/features.prf:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (113182 => 113183)
--- trunk/Source/WebKit2/ChangeLog 2012-04-04 13:20:45 UTC (rev 113182)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-04 13:35:33 UTC (rev 113183)
@@ -1,5 +1,20 @@
2012-04-04 Jesus Sanchez-Palencia <[email protected]>
+ [Qt][WK2] QtWebKit2 should support Page Visibility API
+ https://bugs.webkit.org/show_bug.cgi?id=81164
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implementing the last bits needed for getting the expected
+ behavior for Page Visibility API, according to its spec.
+ The only missing part in Qt was a way to check whether
+ the view was exposed or not.
+
+ * UIProcess/qt/QtPageClient.cpp:
+ (QtPageClient::isViewVisible):
+
+2012-04-04 Jesus Sanchez-Palencia <[email protected]>
+
[WK2] Add Page Visibility API support
https://bugs.webkit.org/show_bug.cgi?id=81154
Modified: trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp (113182 => 113183)
--- trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp 2012-04-04 13:20:45 UTC (rev 113182)
+++ trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp 2012-04-04 13:35:33 UTC (rev 113183)
@@ -29,6 +29,7 @@
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
#include <QGuiApplication>
+#include <QQuickCanvas>
#include <WebCore/Cursor.h>
#include <WebCore/DragData.h>
#include <WebCore/FloatRect.h>
@@ -270,6 +271,11 @@
{
if (!m_webView)
return false;
+
+ // FIXME: this is a workaround while QWindow::isExposed() is not ready.
+ if (m_webView->canvas() && m_webView->canvas()->windowState() == Qt::WindowMinimized)
+ return false;
+
return m_webView->isVisible() && m_webView->page()->isVisible();
}
Modified: trunk/Tools/ChangeLog (113182 => 113183)
--- trunk/Tools/ChangeLog 2012-04-04 13:20:45 UTC (rev 113182)
+++ trunk/Tools/ChangeLog 2012-04-04 13:35:33 UTC (rev 113183)
@@ -1,3 +1,14 @@
+2012-04-04 Jesus Sanchez-Palencia <[email protected]>
+
+ [Qt][WK2] QtWebKit2 should support Page Visibility API
+ https://bugs.webkit.org/show_bug.cgi?id=81164
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enabling Page Visiblity API for Qt WebKit2.
+
+ * qmake/mkspecs/features/features.prf:
+
2012-04-04 Andras Becsi <[email protected]>
[Qt][WK2] Make the WebView a subclass of Flickable
Modified: trunk/Tools/qmake/mkspecs/features/features.prf (113182 => 113183)
--- trunk/Tools/qmake/mkspecs/features/features.prf 2012-04-04 13:20:45 UTC (rev 113182)
+++ trunk/Tools/qmake/mkspecs/features/features.prf 2012-04-04 13:35:33 UTC (rev 113183)
@@ -91,6 +91,7 @@
!contains(DEFINES, ENABLE_ANIMATION_API=.): DEFINES += ENABLE_ANIMATION_API=0
!contains(DEFINES, ENABLE_TOUCH_ADJUSTMENT=.): DEFINES += ENABLE_TOUCH_ADJUSTMENT=1
!contains(DEFINES, ENABLE_FAST_MOBILE_SCROLLING=.): DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
+!contains(DEFINES, ENABLE_PAGE_VISIBILITY_API=.): DEFINES += ENABLE_PAGE_VISIBILITY_API=1
# Policy decisions: for using a particular third-party library or optional OS service
!contains(DEFINES, WTF_USE_QT_IMAGE_DECODER=.): DEFINES += WTF_USE_QT_IMAGE_DECODER=1
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes