Bug 133844 - Removing PAGE_VISIBILITY_API compile guard
Summary: Removing PAGE_VISIBILITY_API compile guard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 134246
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-13 04:08 PDT by Éva Balázsfalvi
Modified: 2014-06-24 03:21 PDT (History)
21 users (show)

See Also:


Attachments
Patch (68.57 KB, patch)
2014-06-13 05:57 PDT, Éva Balázsfalvi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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