Title: [111993] trunk
Revision
111993
Author
[email protected]
Date
2012-03-24 08:23:56 -0700 (Sat, 24 Mar 2012)

Log Message

[Qt][WK2] Implement PageClient::isViewWindowActive()
https://bugs.webkit.org/show_bug.cgi?id=81143

Patch by Jesus Sanchez-Palencia <[email protected]> on 2012-03-24
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

This patch implements PageClient::isViewWindowActive()
now that QQuickCanvas::isActive() is available (from QWindow).

* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):

Tools:

Fix the WrapperWindow from our PlatformWebView
so it correctly creates the platform related
stuff for QWindow, which is not created unless
QWindow::setVisible() or QWindow::show() are called.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::PlatformWebView):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (111992 => 111993)


--- trunk/Source/WebKit2/ChangeLog	2012-03-24 13:34:03 UTC (rev 111992)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-24 15:23:56 UTC (rev 111993)
@@ -1,3 +1,16 @@
+2012-03-24  Jesus Sanchez-Palencia  <[email protected]>
+
+        [Qt][WK2] Implement PageClient::isViewWindowActive()
+        https://bugs.webkit.org/show_bug.cgi?id=81143
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        This patch implements PageClient::isViewWindowActive()
+        now that QQuickCanvas::isActive() is available (from QWindow).
+
+        * UIProcess/qt/QtPageClient.cpp:
+        (QtPageClient::isViewWindowActive):
+
 2012-03-23  Alexey Proskuryakov  <[email protected]>
 
         [Mac] No need for platform-specific ENABLE_BLOB values

Modified: trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp (111992 => 111993)


--- trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp	2012-03-24 13:34:03 UTC (rev 111992)
+++ trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp	2012-03-24 15:23:56 UTC (rev 111993)
@@ -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>
@@ -255,8 +256,9 @@
 
 bool QtPageClient::isViewWindowActive()
 {
-    // FIXME: The scene graph does not have the concept of being active or not when this was written.
-    return true;
+    if (!m_webView || !m_webView->canvas())
+        return false;
+    return m_webView->canvas()->isActive();
 }
 
 bool QtPageClient::isViewFocused()

Modified: trunk/Tools/ChangeLog (111992 => 111993)


--- trunk/Tools/ChangeLog	2012-03-24 13:34:03 UTC (rev 111992)
+++ trunk/Tools/ChangeLog	2012-03-24 15:23:56 UTC (rev 111993)
@@ -1,3 +1,18 @@
+2012-03-24  Jesus Sanchez-Palencia  <[email protected]>
+
+        [Qt][WK2] Implement PageClient::isViewWindowActive()
+        https://bugs.webkit.org/show_bug.cgi?id=81143
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Fix the WrapperWindow from our PlatformWebView
+        so it correctly creates the platform related
+        stuff for QWindow, which is not created unless
+        QWindow::setVisible() or QWindow::show() are called.
+
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+
 2012-03-23  Dirk Pranke  <[email protected]>
 
         nrwt: don't wait for safari to exit before exiting after showing the results file

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (111992 => 111993)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-03-24 13:34:03 UTC (rev 111992)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-03-24 15:23:56 UTC (rev 111993)
@@ -76,6 +76,12 @@
 {
     QQuickWebViewExperimental experimental(m_view);
     experimental.setRenderToOffscreenBuffer(true);
+
+    // QWindow does not create the underlying platform
+    // specific bits unless QWindow::setVisible() or QWindow::show() are called,
+    // and without it QWindow::isActive() will always return false.
+    // For these cases QWindow::create() is provided.
+    m_window->create();
 }
 
 PlatformWebView::~PlatformWebView()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to