Skip to content
  • mitz@apple.com's avatar
    WebCore: · 9cf92a4f
    mitz@apple.com authored
            Reviewed by John Sullivan.
    
            - WebCore part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
    
            Added a setting, updatesWhenOffscreen(), which controls whether an
            offscreen web view gets marked as needing update when its contents
            change (the existing behavior) or not (a new behavior), in which case it
            will be marked as needing update just before it goes on screen. The
            existing behavior (updating while offscreen) remains the default.
    
            * WebCore.base.exp: Added Settings::setUpdatesWhenOffscreen().
            * page/FrameView.cpp:
            (WebCore::FrameView::shouldUpdateWhenOffscreen): Added. Returns the
            value from settings.
            * page/FrameView.h:
            * page/Settings.cpp:
            (WebCore::Settings::setUpdatesWhenOffscreen): Added.
            * page/Settings.h:
            (WebCore::Settings::updatesWhenOffscreen): Added.
            * platform/ScrollView.h:
            * platform/mac/ScrollViewMac.mm:
            (WebCore::ScrollView::updateContents): Added code to return early and
            not call -setNeedsDisplayInRect: if the view is not in a visible window
            and the setting is not to update when offscreen.
    
    WebKit/mac:
    
            Reviewed by John Sullivan.
    
            - WebKit part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
    
            * WebView/WebHTMLView.mm:
            (-[WebHTMLView addWindowObservers]): Added code to observe when the
            window goes onscreen.
            (-[WebHTMLView removeWindowObservers]): Added.
            (-[WebHTMLView windowWillOrderOnScreen:]): Added. If the view is set to
            not update when offscreen, calls -setNeedsDisplay: just before it comes
            onscreen.
            * WebView/WebPreferenceKeysPrivate.h: Added preference key.
            * WebView/WebPreferences.m:
            (+[WebPreferences initialize]): Made updates when offscreen on by
            default.
            (-[WebPreferences updatesWhenOffscreen]): Added.
            (-[WebPreferences setUpdatesWhenOffscreen:]): Added.
            * WebView/WebPreferencesPrivate.h:
            * WebView/WebView.mm:
            (-[WebView _preferencesChangedNotification:]): Added code to update the
            updatesWhenOffscreen setting in WebCore.
    
    WebKitLibraries:
    
            Reviewed by John Sullivan.
    
            - WebKitSystemInterface part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
    
            * WebKitSystemInterface.h: Added WKWindowWillOrderOnScreenNotification.
            * libWebKitSystemInterfaceLeopard.a: Updated.
            * libWebKitSystemInterfaceTiger.a: Updated.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    9cf92a4f