Changeset 152579 in webkit


Ignore:
Timestamp:
Jul 11, 2013, 3:33:11 PM (12 years ago)
Author:
mitz@apple.com
Message:

[mac] No API for getting the page visibility state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=118578

Reviewed by Simon Fraser.

Source/WebCore:

  • WebCore.exp.in: Export WebCore::Page::visibilityState().

Source/WebKit/mac:

  • WebView/WebView.mm:

(kit): Added. Converts from WebCore::PageVisibilityState to WebPageVisibilityState.
(-[WebView _visibilityState]): Added.

  • WebView/WebViewPrivate.h: Declared -_visibilityState.
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152574 r152579  
     12013-07-11  Dan Bernstein  <mitz@apple.com>
     2
     3        [mac] No API for getting the page visibility state of a WebView
     4        https://bugs.webkit.org/show_bug.cgi?id=118578
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebCore.exp.in: Export WebCore::Page::visibilityState().
     9
    1102013-07-11  Mario Sanchez Prada  <mario.prada@samsung.com>
    211
  • trunk/Source/WebCore/WebCore.exp.in

    r152425 r152579  
    15661566__ZNK7WebCore4Page14renderTreeSizeEv
    15671567__ZNK7WebCore4Page15backForwardListEv
     1568__ZNK7WebCore4Page15visibilityStateEv
    15681569__ZNK7WebCore4Page16hasSeenAnyPluginEv
    15691570__ZNK7WebCore4Page17viewportArgumentsEv
  • trunk/Source/WebKit/mac/ChangeLog

    r152571 r152579  
     12013-07-11  Dan Bernstein  <mitz@apple.com>
     2
     3        [mac] No API for getting the page visibility state of a WebView
     4        https://bugs.webkit.org/show_bug.cgi?id=118578
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebView/WebView.mm:
     9        (kit): Added. Converts from WebCore::PageVisibilityState to WebPageVisibilityState.
     10        (-[WebView _visibilityState]): Added.
     11        * WebView/WebViewPrivate.h: Declared -_visibilityState.
     12
    1132013-07-11  Timothy Hatcher  <timothy@apple.com>
    214
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r152348 r152579  
    431431}
    432432
     433static WebPageVisibilityState kit(PageVisibilityState visibilityState)
     434{
     435    switch (visibilityState) {
     436    case PageVisibilityStateVisible:
     437        return WebPageVisibilityStateVisible;
     438    case PageVisibilityStateHidden:
     439        return WebPageVisibilityStateHidden;
     440    case PageVisibilityStatePrerender:
     441        return WebPageVisibilityStatePrerender;
     442    case PageVisibilityStateUnloaded:
     443        return WebPageVisibilityStateUnloaded;
     444    }
     445
     446    ASSERT_NOT_REACHED();
     447    return WebPageVisibilityStateVisible;
     448}
     449
    433450@interface WebView (WebFileInternal)
    434451- (float)_deviceScaleFactor;
     
    29502967
    29512968    return kitLayoutMilestones(page->requestedLayoutMilestones());
     2969}
     2970
     2971- (WebPageVisibilityState)_visibilityState
     2972{
     2973#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
     2974    if (_private->page)
     2975        return kit(_private->page->visibilityState());
     2976#endif
     2977    return WebPageVisibilityStateVisible;
    29522978}
    29532979
  • trunk/Source/WebKit/mac/WebView/WebViewPrivate.h

    r150695 r152579  
    585585- (WebLayoutMilestones)_layoutMilestones;
    586586
     587- (WebPageVisibilityState)_visibilityState;
    587588- (void)_setVisibilityState:(WebPageVisibilityState)visibilityState isInitialState:(BOOL)isInitialState;
    588589
Note: See TracChangeset for help on using the changeset viewer.