Bug 81164 - [Qt][WK2] QtWebKit2 should support Page Visibility API
Summary: [Qt][WK2] QtWebKit2 should support Page Visibility API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jesus Sanchez-Palencia
URL:
Keywords: Qt, QtTriaged
Depends on: 81154
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-14 15:32 PDT by Jesus Sanchez-Palencia
Modified: 2012-04-04 06:35 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.11 KB, patch)
2012-04-03 08:49 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (3.32 KB, patch)
2012-04-03 10:49 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Sanchez-Palencia 2012-03-14 15:32:49 PDT
We should implement the Page Visibility API support in QQuickWebView as soon as WebKit2 and WKTR have what is needed to it.
Comment 1 Allan Sandfeld Jensen 2012-04-01 06:01:13 PDT
It should be noted that parts of the visibility spec is nonsense in a modern desktop sense. 

A user-agent that has been minimized is NOT hidden, it is still rendered for previews and other composition effects. This is the same reason there is no support in Qt to get an event when the top-window is minimized.
Comment 2 Jesus Sanchez-Palencia 2012-04-03 07:04:17 PDT
(In reply to comment #1)
> It should be noted that parts of the visibility spec is nonsense in a modern desktop sense. 
> 
> A user-agent that has been minimized is NOT hidden, it is still rendered for previews and other composition effects. This is the same reason there is no support in Qt to get an event when the top-window is minimized.

With that in mind QWindow::isExposed and the whole new set of exposed events are being cooked, right?

Plus, why can't you use QQuickCanvas::windowStateChanged and check for Qt::WindowMinimized, for instance? (QQuickCanvas inherits QWindow).


cheers!
Comment 3 Allan Sandfeld Jensen 2012-04-03 07:55:10 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > It should be noted that parts of the visibility spec is nonsense in a modern desktop sense. 
> > 
> > A user-agent that has been minimized is NOT hidden, it is still rendered for previews and other composition effects. This is the same reason there is no support in Qt to get an event when the top-window is minimized.
> 
> With that in mind QWindow::isExposed and the whole new set of exposed events are being cooked, right?
> 
> Plus, why can't you use QQuickCanvas::windowStateChanged and check for Qt::WindowMinimized, for instance? (QQuickCanvas inherits QWindow).
> 
> 
QWindow doesn't have a windowStateChange. WindowState needs to be made into a property, or maybe that has already been done?
Comment 4 Jesus Sanchez-Palencia 2012-04-03 08:49:32 PDT
Created attachment 135336 [details]
Patch
Comment 5 Alexis Menard (darktears) 2012-04-03 09:01:09 PDT
Comment on attachment 135336 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135336&action=review

> Source/WebKit2/UIProcess/qt/QtPageClient.cpp:275
> +    if (m_webView->canvas() && m_webView->canvas()->windowState() == Qt::WindowMinimized)

Question is : when the isExposed will be ready? If it's a matter of little time, no need to check the workaround in no?
Comment 6 Early Warning System Bot 2012-04-03 09:44:38 PDT
Comment on attachment 135336 [details]
Patch

Attachment 135336 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/12324125
Comment 7 Jesus Sanchez-Palencia 2012-04-03 10:49:24 PDT
Created attachment 135363 [details]
Patch
Comment 8 WebKit Review Bot 2012-04-04 06:35:49 PDT
Comment on attachment 135363 [details]
Patch

Clearing flags on attachment: 135363

Committed r113183: <http://trac.webkit.org/changeset/113183>
Comment 9 WebKit Review Bot 2012-04-04 06:35:54 PDT
All reviewed patches have been landed.  Closing bug.