Bug 81164

Summary: [Qt][WK2] QtWebKit2 should support Page Visibility API
Product: WebKit Reporter: Jesus Sanchez-Palencia <jesus>
Component: WebKit QtAssignee: Jesus Sanchez-Palencia <jesus>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, menard, ostap73, vestbo, webkit.review.bot, zoltan
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 81154    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

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.