WebCore:

2008-07-23  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        WebCore part of fix for <rdar://problem/5698672>  Add drawing callback for a WebKit app to draw its own scrollbars

        * WebCore.base.exp: Added symbols.
        * page/Chrome.cpp:
        (WebCore::ChromeClient::paintCustomScrollbar): Added. Calls up to WebKit, which will call a new delegate method.
        (WebCore::ChromeClient::paintCustomScrollCorner): ditto.
        * page/ChromeClient.h:
        * page/Settings.cpp:
        (WebCore::Settings::Settings): Added the ability to store whether or not the application has decided to draw its own scrollbars.
        (WebCore::Settings::setShouldPaintCustomScrollbars):
        * page/Settings.h: (WebCore::Settings::shouldPaintCustomScrollbars):
        * platform/ScrollBar.h: Moved ScrollbarControlSize enum to ScrollTypes.h
        * platform/ScrollTypes.h: (WebCore::): Moved some existing types, and added new ones to be used in WebCore in WebKit.
        * platform/win/PlatformScrollBar.h: Moved ScrollbarPart enum to ScrollTypes.h
        * platform/win/PlatformScrollBarSafari.cpp:
        (WebCore::ScrollbarPartToScrollBarPiece): Added helper function.
        (WebCore::ScrollBarPieceMaskToScrollbarControlPartMask): ditto.
        (WebCore::ScrollbarControlStateFromThemeState): ditto.
        (WebCore::PlatformScrollbar::paint): Consolidated painting so the logic for the individual pieces is all in one place.
         Added new code to paint the custom scrollbars if necessary.
        * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::paint): Added code to paint the custom scroll corner if necessary.

WebKit/win:

2008-07-17  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        WebKit part of fix for <rdar://problem/5698672>  Add drawing callback for a WebKit app to draw its own scrollbars
        
        Added a setting so an application can tell WebKit its going to draw custom scrollbars.  Also added delegate methods for the actual painting.
        
        * Interfaces/IWebPreferences.idl:  Added setShouldPaintCustomScrollbars and shouldPaintCustomScrollbars.
        * Interfaces/IWebScrollBarPrivate.idl: Moved types to WebScrollbarTypes.idl
        * Interfaces/IWebUIDelegate.idl: Added WebUIDelegate4 with new delegate methods, paintCustomScrollbar and paintCustomScrollCorner
        * Interfaces/WebKit.idl: Include new WebScrollbarTypes.idl
        * Interfaces/WebScrollbarTypes.idl: Added. Has types that the new delegate methods use.
        * WebCoreSupport/WebChromeClient.cpp:
        (WebChromeClient::paintCustomScrollbar): Added. Calls new delegate method and converts between WebCore types and types exported in WebScrollbarTypes.idl
        (WebChromeClient::paintCustomScrollCorner): Added. Calls new delegate method.
        (WebChromeClient::uiDelegate4): Added.
        * WebCoreSupport/WebChromeClient.h:
        * WebPreferenceKeysPrivate.h: Added WebKitPaintCustomScrollbarsPreferenceKey
        * WebPreferences.cpp:
        (WebPreferences::): Added.
        (WebPreferences::shouldPaintCustomScrollbars): Added.
        * WebPreferences.h:
        * WebView.cpp: (WebView::notifyPreferencesChanged):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed