Changeset 17793 in webkit


Ignore:
Timestamp:
Nov 15, 2006 2:34:54 PM (18 years ago)
Author:
spadma
Message:

2006-11-08 spadma <Sachin.Padma@nokia.com>

Reviewed by Yongjun.
DESC: [S60] Modify Autoload Images and Objects setting to include enabling/disabling of flash.
http://bugs.webkit.org/show_bug.cgi?id=11605

  • BrowserControl/inc/BrCtlDefs.h: (TBrCtlDefs::):
  • BrowserView/inc/BrowserSettingsContainer.h:
  • BrowserView/inc/WebKitControl.h: (CWebKitControl::PluginHandler): (CWebKitControl::AccessPointId): (CWebKitControl::SetAccessPointId):
  • BrowserView/src/BrowserSettingsContainer.cpp: (CBrowserSettingsContainer::InsertDefaultSettingsL):
  • BrowserView/src/WebKitControl.cpp: (CWebKitControl::CWebKitControl): (CWebKitControl::SetBrowserSettingL): (CWebKitControl::GetBrowserSettingL):
  • Plugin/src/PluginSkin.cpp: (CPluginSkin::NewL): (CPluginSkin::ConstructL):
Location:
S60/trunk/WebKit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • S60/trunk/WebKit/BrowserControl/inc/BrCtlDefs.h

    r17517 r17793  
    207207            ECommandSmartLinkSendMessage, ///<
    208208            ECommandSmartLinkAddToPhoneBook, ///<
    209             ECommandShowToolBar, ///<Shows the toolbar
    210             ECommandDisableFlash, ///<Enable/Disable the flash
     209            ECommandShowToolBar ///<Shows the toolbar
    211210            };
    212211        /**
     
    448447            ESettingsSavedPage,           ///< Save the page
    449448            ESettingsSmartLink,
    450             ESettingsAutoOpenDownloads, // For automatically open the downloaded files           
     449            ESettingsAutoOpenDownloads, // For automatically open the downloaded files     
     450            ESettingsDisableFlash, ///<Enable/Disable the flash
    451451            ESettingsMaxEnum              ///< Must be last one
    452452            };
  • S60/trunk/WebKit/BrowserView/inc/BrowserSettingsContainer.h

    r17706 r17793  
    7777#endif
    7878const TBool KDefaultESettingsAutoOpenDownloads = ETrue;
     79const TBool KDefaultESettingsDisableFlash = EFalse;
     80
    7981
    8082const TInt KDefaultESettingsApId = 0;
  • S60/trunk/WebKit/BrowserView/inc/WebKitControl.h

    r17517 r17793  
    239239    public: // New functions
    240240
    241     /**
    242     * WebKitView
    243     * Return WebKitView object
    244     * @since 3.x
     241        /**
     242        * WebKitView
     243        * Return WebKitView object
     244        * @since 3.x
    245245        * @return WebKitView object
    246     */
     246        */
    247247        CWebKitView& WebKitView() const { return *iWebKitView; }
    248248
     
    281281        HBufC* PageInfoLC( TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo );
    282282
    283     /**
     283        /**
    284284        * LoadSavedPageL
    285285        * Parse and load the page data supplied via the buffer
     
    289289        void LoadSavedPageL( const TDesC& aUid, TDesC& aSavedPageBuffer );
    290290
    291     /**
    292     * HandleLoaderCommandL
    293     * Handle the commands related to resource loader
    294     * @since 3.x
    295         * @return void
    296     */
    297     void HandleLoaderCommandL( TInt aCommand );
     291        /**
     292        * HandleLoaderCommandL
     293        * Handle the commands related to resource loader
     294        * @since 3.x
     295        * @return void
     296        */
     297        void HandleLoaderCommandL( TInt aCommand );
    298298
    299299        /**
     
    306306
    307307
    308     /**
     308        /**
    309309        * CreateWindow
    310310        * Purpose
     
    335335        CWebKitView* FindWindowNamed(const TDesC& aFrameName);
    336336
    337     /**
     337        /**
    338338        * DelegateWindowCommand
    339339        * From MWebClientBridge
     
    342342        * @param TBrCtlWindowCommand window command
    343343        */
    344     void DelegateWindowCommand(TBrCtlWindowCommand aCommand);
    345 
    346     /**
     344        void DelegateWindowCommand(TBrCtlWindowCommand aCommand);
     345
     346        /**
    347347        * Start DataLoad
    348348        * Load the data
     
    350350        * @return void
    351351        */
    352     TInt StartDataLoadL( const TDesC& aUrl, CDataLoadInfo& aDataLoadInfo );
    353 
    354     /**
     352        TInt StartDataLoadL( const TDesC& aUrl, CDataLoadInfo& aDataLoadInfo );
     353
     354        /**
    355355        * IsUrlInCache
    356356        * Ask the Browser Control if a URL is in cache
     
    386386        TPtrC UserAgentStringL();
    387387
    388     /**
    389     * return history controller
    390     * @return history controller
    391     */
     388        /**
     389        * return history controller
     390        * @return history controller
     391        */
    392392        CHistoryController& HistoryController() const { return *iHistoryController; }
    393393
    394     /**
    395     * HistoryLength
    396     * @return the number of entries in the history list
    397     */
     394        /**
     395        * HistoryLength
     396        * @return the number of entries in the history list
     397        */
    398398        TInt HistoryLength() const;
    399399
    400     /**
    401     * HandleHistoryCommandL
    402     * Handle the commands related to history object
    403     * @since 3.x
    404         * @return void
    405     */
    406     void HandleHistoryCommandL( TInt aCommand );
    407 
    408     /**
    409     * ClearHistoryList
    410     * Clears History List
    411     * @since 3.x
    412         * @return void
    413     */
     400        /**
     401        * HandleHistoryCommandL
     402        * Handle the commands related to history object
     403        * @since 3.x
     404        * @return void
     405        */
     406        void HandleHistoryCommandL( TInt aCommand );
     407
     408        /**
     409        * ClearHistoryList
     410        * Clears History List
     411        * @since 3.x
     412        * @return void
     413        */
    414414        void ClearHistoryList();
    415415
    416     /**
    417     * GoBackOrForward
    418     * Load url from history + or - distance from current page
    419     * @return void
    420     */
    421     void GoBackOrForward( TInt aDistance );
     416        /**
     417        * GoBackOrForward
     418        * Load url from history + or - distance from current page
     419        * @return void
     420        */
     421        void GoBackOrForward( TInt aDistance );
    422422
    423423        /**
     
    428428        TBool CanGoBackOrForward( TInt aDistance );
    429429
    430     /**
    431     * NavigationAvailable
    432     * Determine if Back and Forward navigation options should be visible
    433     * @since 3.x
    434     * @return TBool - ETrue if direction is visible
    435     */
    436     TBool NavigationAvailable( TBrCtlDefs::TBrCtlNavigationDirection aDirection );
     430        /**
     431        * NavigationAvailable
     432        * Determine if Back and Forward navigation options should be visible
     433        * @since 3.x
     434        * @return TBool - ETrue if direction is visible
     435        */
     436        TBool NavigationAvailable( TBrCtlDefs::TBrCtlNavigationDirection aDirection );
    437437
    438438        /**
     
    441441        * return CArrayFixFlat
    442442        */
    443     CArrayFixFlat<TBrCtlImageCarrier>* PageImagesL();
     443        CArrayFixFlat<TBrCtlImageCarrier>* PageImagesL();
    444444
    445445        /**
     
    448448        * return void
    449449        */
    450     void LoadImages();
     450        void LoadImages();
    451451
    452452        /**
     
    465465        */
    466466        CPluginHandler& PluginHandler() const {
    467       return (CStaticObjectContainer::Instance().PluginHandlerL(*iBrCtl)); }
    468 
    469         /**
    470     * Requests a pointer to the Zoom Level array maintained by the webkit view
    471     * @since 3.0
    472     * @return A pointer to the zoom levels array
     467            return (CStaticObjectContainer::Instance().PluginHandlerL(*iBrCtl)); }
     468
     469        /**
     470        * Requests a pointer to the Zoom Level array maintained by the webkit view
     471        * @since 3.0
     472        * @return A pointer to the zoom levels array
    473473        */
    474474        RArray<TUint>* ZoomLevels() const;
     
    493493
    494494
    495     /**
     495        /**
    496496        * Retrive the image count of the rectangle
    497497        *
    498498        */
    499     TInt ImageCount() const;
     499        TInt ImageCount() const;
    500500
    501501
     
    545545          return (CStaticObjectContainer::Instance().FormDataManagerHandlerL(*iBrCtl)); }
    546546
    547     /**
     547        /**
    548548        * PluginResized
    549549        * This will relayout the rendering objects, because the plugin was resized
     
    551551        * return void
    552552        */
    553     void PluginResized();
     553        void PluginResized();
    554554
    555555        /**
     
    589589
    590590        /**
    591     * ProgressUpdate
    592     *
    593     * @since 3.x
    594         * @return void
    595     */
     591        * ProgressUpdate
     592        *
     593        * @since 3.x
     594        * @return void
     595        */
    596596        void ProgressUpdate();
    597597
     
    706706        * @return access point id
    707707        */
    708     TUint32 AccessPointId() { return iApId; }
     708        TUint32 AccessPointId() { return iApId; }
    709709
    710710
     
    714714        * @return
    715715        */
    716     void SetAccessPointId(TUint32 aApId) { iApId = aApId; }
     716        void SetAccessPointId(TUint32 aApId) { iApId = aApId; }
    717717
    718718        /*
     
    729729        */
    730730        void ForegroundEvent(TBool aForeground);
    731        
    732        
    733     /**
    734     * DisableFlashSetting
    735     *
    736     * @since 3.2
    737     * @return TBool
    738     */
    739    
    740 
    741     TBool DisableFlashSetting() { return iDisableFlash; }
    742    
     731           
    743732
    744733#ifdef RD_32_BROWSER
     
    791780        void ConstructL();
    792781
    793     /**
     782        /**
    794783        * ShowHistoryViewL
    795784        *
    796785        * @since 3.x
    797786        * @return void
    798     */
     787        */
    799788        void ShowHistoryViewL(TBool aPrevious);
    800789
    801     /**
    802     * ShowHistoryListL
    803     *
    804     * @since 3.x
    805         * @return void
    806     */
     790        /**
     791        * ShowHistoryListL
     792        *
     793        * @since 3.x
     794        * @return void
     795        */
    807796        void ShowHistoryListL();
    808797
    809     /**
    810     * LoadHistoryEntry
    811     *
    812     * @since 3.x
    813         * @return void
    814     */
     798        /**
     799        * LoadHistoryEntry
     800        *
     801        * @since 3.x
     802        * @return void
     803        */
    815804        void LoadHistoryEntry( CArrayFixFlat<TBrCtlSelectOptionData>& aHistoryList );
    816805
    817     /**
    818     * InitializeWebCoreL
    819     *
    820     * @since 3.x
    821         * @return void
    822     */
     806        /**
     807        * InitializeWebCoreL
     808        *
     809        * @since 3.x
     810        * @return void
     811        */
    823812        void InitializeWebCoreL();
    824813
    825     /**
    826     * InitializeSettingsL
    827     *
    828     * @since 3.x
    829         * @return void
    830     */
     814        /**
     815        * InitializeSettingsL
     816        *
     817        * @since 3.x
     818        * @return void
     819        */
    831820        void InitializeSettingsL();
    832821
    833     /**
    834     * LoadResourceFileL
    835     *
    836     * @since 3.x
    837         * @return void
    838     */
     822        /**
     823        * LoadResourceFileL
     824        *
     825        * @since 3.x
     826        * @return void
     827        */
    839828        void LoadResourceFileL();
    840829
     
    848837
    849838        /**
    850     * ResetProgress
    851     *
    852     * @since 3.x
    853         * @return void
    854     */
     839        * ResetProgress
     840        *
     841        * @since 3.x
     842        * @return void
     843        */
    855844        void ResetProgress();
    856845
    857846        /**
    858     * FinalProgressComplete
    859     *
    860     * @since 3.x
    861         * @return void
    862     */
     847        * FinalProgressComplete
     848        *
     849        * @since 3.x
     850        * @return void
     851        */
    863852        void FinalProgressComplete();
    864853
    865854        /**
    866     * CheckForCancelComplete
    867     *
    868     * @since 3.x
    869         * @return void
    870     */
     855        * CheckForCancelComplete
     856        *
     857        * @since 3.x
     858        * @return void
     859        */
    871860        void CheckForCancelComplete();
    872861       
    873    
    874     void HandleDisableFlashSetting( TBool aFlashValue, TBool aImageValue );
    875862
    876863    private:    // Data
     
    922909        TInt  iInitialProgressPercentage;
    923910
    924     // access point id that is used for connection
    925     TInt32 iApId;
     911        // access point id that is used for connection
     912        TInt32 iApId;
    926913        // true if application is in the background
    927914        TBool   iSuspendTimers;
    928915       
    929         //Settings to store value of the Flash Disable
    930         TBool   iDisableFlash;
    931 
    932916#ifdef RD_32_BROWSER
    933917        // plugin player
  • S60/trunk/WebKit/BrowserView/src/BrowserSettingsContainer.cpp

    r17706 r17793  
    295295#endif   
    296296    SettingL( TBrCtlDefs::ESettingsAutoOpenDownloads ).SetBoolValueL( KDefaultESettingsAutoOpenDownloads );
     297    SettingL( TBrCtlDefs::ESettingsDisableFlash ).SetBoolValueL( KDefaultESettingsDisableFlash );
    297298    }
    298299
  • S60/trunk/WebKit/BrowserView/src/WebKitControl.cpp

    r17706 r17793  
    530530    iGenerateSavedPage(ETrue),
    531531    iHeaderArrived(EFalse),   
    532     iInitialProgressPercentage( KMinInitialProgressPercentage ),
    533     iDisableFlash (ETrue)
     532    iInitialProgressPercentage( KMinInitialProgressPercentage )
    534533    {
    535534    iProgressNotificationInterval = 0.02;
     
    638637    }
    639638   
    640    
    641 // -----------------------------------------------------------------------------
    642 // CWebKitControl::HandleDisableFlashSetting
    643 // Private Class Method
    644 //-------------------------------------------------   
    645 void  CWebKitControl::HandleDisableFlashSetting( TBool aFlashValue, TBool aImageValue )
    646 {
    647 
    648    
    649      if ( ( !aFlashValue ) && aImageValue  )
    650      {
    651      //Enable the flash loading
    652      //AutoImage loading is enable(ETrue) and aFlashValue is enable(EFalse)
    653      iDisableFlash = EFalse;  //Means enable the flash loading
    654      }
    655      else if( (!aImageValue)  )
    656      {
    657      //Disable the flash loading
    658      //AutoImage loading is disabled(EFalse). Don't care about the
    659      //new value of the flash  aFlashValue as image loading is being
    660      //disabled.
    661      iDisableFlash = ETrue;  //Means disable the flash loading
    662      }
    663      else if( aFlashValue && aImageValue  )
    664      {
    665      //Disable the flash loading 
    666      iDisableFlash = ETrue;  //Means disable the flash loading 
    667      }
    668 
    669    //To do: Need to remove following line when UI check in their
    670    //changes. Till then keep the flash loading on.
    671   iDisableFlash = EFalse;
    672 }//end CWebKitControl::HandleDisableFlashSetting()
    673 
    674 
    675639
    676640// -----------------------------------------------------------------------------
     
    703667#endif
    704668        case TBrCtlDefs::ESettingsAutoOpenDownloads:
     669        case TBrCtlDefs::ESettingsDisableFlash:
    705670            {
    706671            TBool val( aValue );
    707672            iBrowserSettingsContainer->SettingL( TBrCtlDefs::TBrCtlSettings(
    708673                aSetting )).SetBoolValueL( val );
    709             if( aSetting == TBrCtlDefs::ESettingsAutoLoadImages )
    710             {
    711             HandleDisableFlashSetting( iDisableFlash, val );
    712             }
    713674            break;
    714675            }
     
    748709            iHistoryController->SetHistoryViewEnabled(aValue);
    749710            }
    750         case TBrCtlDefs::ECommandDisableFlash:
    751           { 
    752            TBool autoLoadImages = ETrue;
    753            if( iBrowserSettingsContainer )
    754           {
    755           autoLoadImages =  iBrowserSettingsContainer->SettingL(
    756                        TBrCtlDefs::TBrCtlSettings(TBrCtlDefs::ESettingsAutoLoadImages) ).BoolValue();
    757              
    758           }
    759             HandleDisableFlashSetting( aValue, autoLoadImages );
    760           break; 
    761           }
    762711        default:
    763712            {
     
    798747#endif
    799748        case TBrCtlDefs::ESettingsAutoOpenDownloads:
     749        case TBrCtlDefs::ESettingsDisableFlash:
    800750            {
    801751            retVal = (TUint)iBrowserSettingsContainer->SettingL(
     
    842792            break;
    843793            }
    844         case TBrCtlDefs::ECommandDisableFlash:
    845           {
    846           retVal  = ( TUint ) iDisableFlash;
    847           break;
    848           }
    849794        default:
    850795            {
  • S60/trunk/WebKit/ChangeLog

    r17790 r17793  
     12006-11-08  spadma  <Sachin.Padma@nokia.com>
     2
     3        Reviewed by Yongjun.
     4        DESC: [S60] Modify Autoload Images and Objects setting to include enabling/disabling of flash.
     5        http://bugs.webkit.org/show_bug.cgi?id=11605
     6
     7        * BrowserControl/inc/BrCtlDefs.h:
     8        (TBrCtlDefs::):
     9        * BrowserView/inc/BrowserSettingsContainer.h:
     10        * BrowserView/inc/WebKitControl.h:
     11        (CWebKitControl::PluginHandler):
     12        (CWebKitControl::AccessPointId):
     13        (CWebKitControl::SetAccessPointId):
     14        * BrowserView/src/BrowserSettingsContainer.cpp:
     15        (CBrowserSettingsContainer::InsertDefaultSettingsL):
     16        * BrowserView/src/WebKitControl.cpp:
     17        (CWebKitControl::CWebKitControl):
     18        (CWebKitControl::SetBrowserSettingL):
     19        (CWebKitControl::GetBrowserSettingL):
     20        * Plugin/src/PluginSkin.cpp:
     21        (CPluginSkin::NewL):
     22        (CPluginSkin::ConstructL):
     23
    1242006-11-15  spadma  <Sachin.Padma@nokia.com>
    225
  • S60/trunk/WebKit/Plugin/src/PluginSkin.cpp

    r17517 r17793  
    111111   
    112112    //Check if the flash plugin is enabled or disabled.
    113     if( ( aMIMEType.Find(KContentTypeFlash) != KErrNotFound ) &&
    114         ( aWebKitFrame.WebKitView().WebKitControl().DisableFlashSetting() ) )   
    115     {
    116     self = NULL;
    117     }
    118     else
    119     {   
    120113    self = new (ELeave) CPluginSkin( aWebKitFrame );
    121114    CleanupStack::PushL( self );
     
    123116                      aUrl, aBaseUrl, aCanPluginInteract );
    124117    CleanupStack::Pop();    // self
    125     }
    126118    return self;
    127119    }
     
    256248            else
    257249                {
     250                TBool loadPluginContent = iWebKitFrame->WebKitView().WebKitControl().GetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages );
     251
     252                if( ( aMIMEType.Find(KContentTypeFlash) != KErrNotFound ) )
     253                    {
     254                    loadPluginContent = loadPluginContent && !iWebKitFrame->WebKitView().WebKitControl().GetBrowserSettingL( TBrCtlDefs::ESettingsDisableFlash );
     255                    }
     256 
    258257                // After UI CR for adding setting for plugin, use the ESetting AutoLoadPlugins
    259                 if ( iWebKitFrame->WebKitView().WebKitControl().GetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages ) )
     258                if ( loadPluginContent )
    260259                    {
    261260                    // Load the plugin content NOW since autoload is ON and the phone is non-US build
Note: See TracChangeset for help on using the changeset viewer.