Bug 133844

Summary: Removing PAGE_VISIBILITY_API compile guard
Product: WebKit Reporter: Éva Balázsfalvi <evab.u-szeged>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, benjamin, bunhere, calvaris, cdumez, cmarcelo, commit-queue, dbates, eric.carlson, esprehn+autocc, evab.u-szeged, glenn, gyuyoung.kim, jer.noble, kangil.han, kling, kondapallykalyan, ossy, philipj, rakuco, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 134246    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Éva Balázsfalvi 2014-06-13 04:08:09 PDT
https://lists.webkit.org/pipermail/webkit-dev/2014-January/026105.html
"This feature is now stable & I think this is enabled on all ports, I plan to remove the #ifdefs."

I checked, it is enabled everywhere: EFL, GTK, Mac (iOS too), Windows
Comment 1 Éva Balázsfalvi 2014-06-13 05:57:03 PDT
Created attachment 233044 [details]
Patch
Comment 2 Csaba Osztrogonác 2014-06-21 01:52:32 PDT
Landed in https://trac.webkit.org/changeset/170235
Comment 3 Andreas Kling 2014-06-23 19:00:42 PDT
Comment on attachment 233044 [details]
Patch

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

> Source/WebKit/mac/WebView/WebView.mm:4327
> -#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
> +#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
>      if (_private->page)
>          return kit(_private->page->visibilityState());
>  #endif

This looks wrong, now the code will only run if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING) is true.
Shouldn't we remove the #if guard entirely here?
Comment 4 Éva Balázsfalvi 2014-06-24 03:19:33 PDT
(In reply to comment #3)
> (From update of attachment 233044 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=233044&action=review
> 
> > Source/WebKit/mac/WebView/WebView.mm:4327
> > -#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
> > +#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
> >      if (_private->page)
> >          return kit(_private->page->visibilityState());
> >  #endif
> 
> This looks wrong, now the code will only run if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING) is true.
> Shouldn't we remove the #if guard entirely here?

Good point, thanks for noticing,

Sorry, my bad. I've made a quick fix: https://bugs.webkit.org/show_bug.cgi?id=134246