Title: [97010] trunk/Source/WebKit2
- Revision
- 97010
- Author
- [email protected]
- Date
- 2011-10-08 08:37:23 -0700 (Sat, 08 Oct 2011)
Log Message
[Qt] [WK2] Wrong handling of visibility in QTouchWebPage
https://bugs.webkit.org/show_bug.cgi?id=69670
Patch by Viatcheslav Ostapenko <[email protected]> on 2011-10-08
Reviewed by Andreas Kling.
Replace QTouchWebPage visibility handling by Show/Hide events with use of
QSGItem::visibleChanged signal.
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::QTouchWebPage):
(QTouchWebPage::event):
(QTouchWebPage::onVisibleChanged):
* UIProcess/API/qt/qtouchwebpage.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (97009 => 97010)
--- trunk/Source/WebKit2/ChangeLog 2011-10-08 14:19:36 UTC (rev 97009)
+++ trunk/Source/WebKit2/ChangeLog 2011-10-08 15:37:23 UTC (rev 97010)
@@ -1,3 +1,19 @@
+2011-10-08 Viatcheslav Ostapenko <[email protected]>
+
+ [Qt] [WK2] Wrong handling of visibility in QTouchWebPage
+ https://bugs.webkit.org/show_bug.cgi?id=69670
+
+ Reviewed by Andreas Kling.
+
+ Replace QTouchWebPage visibility handling by Show/Hide events with use of
+ QSGItem::visibleChanged signal.
+
+ * UIProcess/API/qt/qtouchwebpage.cpp:
+ (QTouchWebPage::QTouchWebPage):
+ (QTouchWebPage::event):
+ (QTouchWebPage::onVisibleChanged):
+ * UIProcess/API/qt/qtouchwebpage.h:
+
2011-10-08 Sheriff Bot <[email protected]>
Unreviewed, rolling out r96996.
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp (97009 => 97010)
--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp 2011-10-08 14:19:36 UTC (rev 97009)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp 2011-10-08 15:37:23 UTC (rev 97010)
@@ -38,6 +38,7 @@
// We do the transform from the top left so the viewport can assume the position 0, 0
// is always where rendering starts.
setTransformOrigin(TopLeft);
+ connect(this, SIGNAL(visibleChanged()), SLOT(onVisibleChanged()));
}
QTouchWebPage::~QTouchWebPage()
@@ -91,17 +92,6 @@
*/
bool QTouchWebPage::event(QEvent* ev)
{
- switch (ev->type()) {
- case QEvent::Show:
- d->page->setPageIsVisible(true);
- break;
- case QEvent::Hide:
- d->page->setPageIsVisible(false);
- break;
- default:
- break;
- }
-
if (d->page->handleEvent(ev))
return true;
return QSGItem::event(ev);
@@ -166,4 +156,9 @@
this->page = page;
}
+void QTouchWebPage::onVisibleChanged()
+{
+ d->page->setPageIsVisible(isVisible());
+}
+
#include "moc_qtouchwebpage.cpp"
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h (97009 => 97010)
--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h 2011-10-08 14:19:36 UTC (rev 97009)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h 2011-10-08 15:37:23 UTC (rev 97010)
@@ -72,6 +72,9 @@
void loadFailed(QTouchWebPage::ErrorType errorType, int errorCode, const QUrl& url);
void loadProgressChanged(int progress);
+protected Q_SLOTS:
+ void onVisibleChanged();
+
protected:
virtual void keyPressEvent(QKeyEvent*);
virtual void keyReleaseEvent(QKeyEvent*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes