[Webkit-unassigned] [Bug 109422] [Qt] Add Page Visibility API support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 5 03:59:08 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=109422


Jocelyn Turcotte <jocelyn.turcotte at digia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jocelyn.turcotte at digia.com




--- Comment #55 from Jocelyn Turcotte <jocelyn.turcotte at digia.com>  2013-08-05 03:58:49 PST ---
(In reply to comment #54)
> > > Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h:136
> > > +    // Must match with values of PageVisibilityState enum from PageVisibilityState.h.
> Initially I made a switch-case and then I delete it... :) For the default value, should I return the hidden value?
The default shouldn't happen as we should still try to maintain the match between the enums. So just put an ASSERT(FALSE) and return any reasonable default value.

> I agree, in the current implementation if the visibility API isn't enable the visibility attributes are available even so and set to hidden. That's why I used this default value. 
>From my understanding, if the visibility API isn't enabled, document.visibilityState and document.hidden both return 'undefined'. When enabled I think that default value should be 'visible'.

> > We should simply enable the compile-time flag all the time if we're exposing the API. A feature is usually not enabled only if it isn't implemented or ready.
> In this case should I remove all PAGE_VISIBILITY_API references:
> Source/WTF/wtf/FeatureDefines.h
> Source/WebCore/dom/Document.cpp
> Source/WebCore/dom/Document.h
> Source/WebCore/page/Frame.cpp
> Source/WebCore/page/Frame.h
> Source/WebCore/page/Page.cpp
> Source/WebCore/page/Page.h
> Source/WebCore/page/PageVisibilityState.cpp
> Source/WebCore/page/PageVisibilityState.h
> Source/WebCore/page/Settings.cpp
> Source/WebCore/page/Settings.h
> Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
> Tools/Scripts/webkitperl/FeatureList.pm
> Tools/qmake/mkspecs/features/features.pri
> And WebKit2 files? 
> 
> Or just doing the assumption that this feature is always enabled in QWebPageAdapter?

We should just make the feature enabled by default in our build system and assume that the feature is enabled in Qt-specific sources. We shouldn't change cross-port code as other port might want or not to enable this feature.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list