# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272379577 -10800 # Node ID 4917f9bf7995588333e881ec834c0fdc1bcdeebb # Parent ac77f89b1d9e26419c9234e36bce872c00d4674c Revision: 201016 Kit: 201017 diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/connectionmanager/Src/ConnectionObservers.cpp --- a/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/browserutilities/connectionmanager/Src/ConnectionObservers.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -235,6 +235,7 @@ if( (err = iServer.Connect()) == KErrNone ) { err = iConnection.Open( iServer, *aConnName ); +#ifndef BRDO_OCC_ENABLED_FF if( !err ) { TBuf<64> query; @@ -262,8 +263,9 @@ } } } +#endif } - + CLOG_WRITE_1( "CConnectionStageNotifierWCB::DoOpenAgentL Any error: %d", err ); if( err ) { iConnection.Close(); diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp --- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -6795,7 +6795,7 @@ { continue; } - if( drive == currentDrive )//if the current path is same as the path in cenrep then no need to update.The diff is because we must have not known size before hand + if( drive == currentDrive || iStorage->DestFNameSet())//if the current path is same as the path in cenrep then no need to update.The diff is because we must have not known size before hand { #ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF if( !downloadPathPlugin ) diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -1255,9 +1255,14 @@ // First find the current download in the model. TInt index(0); TDownloadUiData* dlDataPtr = FindDlUiData( *iListModel, aDownload, index ); - if ( !dlDataPtr ) + if ( !dlDataPtr || dlDataPtr->iDownloadState == EHttpDlCompleted ) { - // do nothing + /* + For download completed do not update any thing in UI list.Download was small and may + have completed before you could recieve progress notification + + do nothing + */ } else { @@ -1429,7 +1434,7 @@ { aDownload.GetStringAttribute( EDlAttrAlbumName, dlData.iName ); } - else if (dlData.iProgressState == EHttpProgContentFileMovedAndDestFNChanged) + else if ( !(dlData.iProgressState == EHttpProgContentFileMoved) || dlData.iProgressState == EHttpProgContentFileMovedAndDestFNChanged) // Filename changed, get the updated filename { CLOG_WRITE(" EHttpProgDlNameChanged"); @@ -1441,6 +1446,7 @@ if( dlData.iProgressState == EHttpProgContentFileMoved || dlData.iProgressState == EHttpProgContentFileMovedAndDestFNChanged ) { + aDownload.GetIntAttribute( EDlAttrDestRemovable, dlData.iExternalMemoryStatus ); HBufC8* contentType = iUiUtils->ContentTypeL( aDownload, ETrue, KFirstMoIndex ); if ( contentType->Length() > KMaxContentTypeLength ) { @@ -2715,3 +2721,4 @@ /* End of file. */ + diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -306,6 +306,18 @@ } } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + TInt inProgressCount = iDownloadsListArray->DownloadsCount + ( MASKED_DL_STATE(EHttpDlCreated) | + MASKED_DL_STATE(EHttpDlPaused) | + MASKED_DL_STATE(EHttpDlInprogress) | + MASKED_DL_STATE(EHttpDlMultipleMOFailed)); + + if ( inProgressCount <= 1 ) + { + ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); + } +#endif // Close the dialog, if necessary if ( iListBox->Model()->NumberOfItems() == 0 ) { diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -58,7 +58,7 @@ // LOCAL CONSTANTS AND MACROS _LIT( KListBoxSeparator, "\t" ); _LIT( KDownloadPath,"download"); - +const TInt KMyFavApplicationUid = 0x200110D5; const TInt KDownloadConfSizeLimit = 100000; @@ -247,7 +247,20 @@ } else { - ret = ShowDownloadConfirmationL( aDownload, aCbaResource ); + // For mimetype that download confirmation dialog should not be shown + TUid pdPlayerUid = { 0 }; + TDataType dataType ( *contentType ); + CDocumentHandler* docHandler = CDocumentHandler::NewLC(); + TBool pdSupported = docHandler->CanHandleProgressivelyL( dataType , pdPlayerUid ); + CleanupStack::PopAndDestroy ( docHandler ); + if ( pdPlayerUid == KMyFavApplicationUid) + { + ret = ETrue; + } + else + { + ret = ShowDownloadConfirmationL( aDownload, aCbaResource ); + } } CleanupStack::PopAndDestroy( contentType ); } diff -r ac77f89b1d9e -r 4917f9bf7995 browserutilities/webutils/conf/webutils.confml Binary file browserutilities/webutils/conf/webutils.confml has changed diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/connection_manager_api/inc/MConnection.h --- a/web_plat/connection_manager_api/inc/MConnection.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/connection_manager_api/inc/MConnection.h Tue Apr 27 17:46:17 2010 +0300 @@ -217,4 +217,4 @@ virtual void SetOccPreferences( TSetOCCPreferences aOCCPreferences ) = 0; }; -#endif \ No newline at end of file +#endif diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h --- a/web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/cxml_library_api/inc/cxml_nw2cxmlTypes.h Tue Apr 27 17:46:17 2010 +0300 @@ -62,3 +62,4 @@ #endif /* CXML_NW2CXMLTYPES_H */ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/cxml_library_api/inc/cxml_proj.h --- a/web_plat/cxml_library_api/inc/cxml_proj.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/cxml_library_api/inc/cxml_proj.h Tue Apr 27 17:46:17 2010 +0300 @@ -47,3 +47,4 @@ #endif /* CXML_PROJ_H */ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/cxml_library_api/inc/nw_wbxml_token.h --- a/web_plat/cxml_library_api/inc/nw_wbxml_token.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/cxml_library_api/inc/nw_wbxml_token.h Tue Apr 27 17:46:17 2010 +0300 @@ -91,3 +91,4 @@ #endif + diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/download_path_plugin_api/inc/DownloadPathHandler.h --- a/web_plat/download_path_plugin_api/inc/DownloadPathHandler.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/download_path_plugin_api/inc/DownloadPathHandler.h Tue Apr 27 17:46:17 2010 +0300 @@ -2,7 +2,7 @@ File : DownloadPathHandler.h Part of : web_plat / download_path_plugin_api Description : Download path handler plugin interface definition file - Version : %version: 1 % << Don't touch! Updated by Synergy at check-out. + Version : %version: sd1s60p2#1 % << Don't touch! Updated by Synergy at check-out. Copyright (c) 2010 Nokia Corporation. This material, including documentation and any related diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/feeds_engine_api/inc/FeedsEntity.h --- a/web_plat/feeds_engine_api/inc/FeedsEntity.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsEntity.h Tue Apr 27 17:46:17 2010 +0300 @@ -246,3 +246,4 @@ #endif //__FEEDSENTITY_H__ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/feeds_engine_api/inc/FeedsInterface.h --- a/web_plat/feeds_engine_api/inc/FeedsInterface.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsInterface.h Tue Apr 27 17:46:17 2010 +0300 @@ -469,4 +469,4 @@ }; #endif // FEED_INTERFACE_H -// End of File \ No newline at end of file +// End of File diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/feeds_engine_api/inc/FeedsServerClient.h --- a/web_plat/feeds_engine_api/inc/FeedsServerClient.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerClient.h Tue Apr 27 17:46:17 2010 +0300 @@ -262,4 +262,4 @@ #endif // FEEDS_SERVER_CLIENT_H -// End of File \ No newline at end of file +// End of File diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/feeds_engine_api/inc/FeedsServerFeed.h --- a/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/FeedsServerFeed.h Tue Apr 27 17:46:17 2010 +0300 @@ -647,4 +647,4 @@ }; #endif // FEEDS_SERVER_FEED_H -// End of File \ No newline at end of file +// End of File diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/feeds_engine_api/inc/Transaction.h --- a/web_plat/feeds_engine_api/inc/Transaction.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/feeds_engine_api/inc/Transaction.h Tue Apr 27 17:46:17 2010 +0300 @@ -503,4 +503,4 @@ #endif // TRANSACTION_H -// End of File \ No newline at end of file +// End of File diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/launcher_api/inc/BrowserOverriddenSettings.h --- a/web_plat/launcher_api/inc/BrowserOverriddenSettings.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/launcher_api/inc/BrowserOverriddenSettings.h Tue Apr 27 17:46:17 2010 +0300 @@ -109,4 +109,4 @@ #include -#endif //BROWSER_OVERRIDDEN_SETTINGS_H \ No newline at end of file +#endif //BROWSER_OVERRIDDEN_SETTINGS_H diff -r ac77f89b1d9e -r 4917f9bf7995 web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h --- a/web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_plat/webutils_api/inc/WebUtilsSDKCRKeys.h Tue Apr 27 17:46:17 2010 +0300 @@ -20,4 +20,4 @@ const TUid KCRUidWebUtils = {0x101F8731}; -#endif // WEBUTILSSDKCRKEYS_H \ No newline at end of file +#endif // WEBUTILSSDKCRKEYS_H diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/browser_control_api/inc/BrCtlDefs.h --- a/web_pub/browser_control_api/inc/BrCtlDefs.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Tue Apr 27 17:46:17 2010 +0300 @@ -206,15 +206,12 @@ ECommandEnterFullscreenBrowsing, ECommandLeaveFullscreenBrowsing, ECommandZoomIn, - ECommandZoomOut -#ifdef BRDO_OCC_ENABLED_FF - , + ECommandZoomOut, ECommandRetryTransactions, ECommandSetRetryConnectivityFlag, ECommandUnSetRetryConnectivityFlag, ECommandClearQuedTransactions, ECommandConnToDownloadManager -#endif }; /** * The load event that occurred. diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h --- a/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/CEcomBrowserPluginInterface.h Tue Apr 27 17:46:17 2010 +0300 @@ -87,3 +87,4 @@ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/browser_plugin_api/inc/np_defines.h --- a/web_pub/browser_plugin_api/inc/np_defines.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/np_defines.h Tue Apr 27 17:46:17 2010 +0300 @@ -52,3 +52,4 @@ // End of File + diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/browser_plugin_api/inc/prtypes.h --- a/web_pub/browser_plugin_api/inc/prtypes.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/browser_plugin_api/inc/prtypes.h Tue Apr 27 17:46:17 2010 +0300 @@ -549,3 +549,4 @@ #endif /* prtypes_h___ */ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/download_mgr_client_api/inc/DownloadMgrClient.h --- a/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/download_mgr_client_api/inc/DownloadMgrClient.h Tue Apr 27 17:46:17 2010 +0300 @@ -1122,3 +1122,4 @@ #endif /* __DOWNLOADMGR_CLIENT_H__ */ + diff -r ac77f89b1d9e -r 4917f9bf7995 web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h --- a/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Wed Apr 14 17:06:56 2010 +0300 +++ b/web_pub/download_mgr_ui_api/inc/DownloadsListDlgObserver.h Tue Apr 27 17:46:17 2010 +0300 @@ -75,3 +75,4 @@ #endif /* DOWNLOADSLISTDLGOBSERVER_H */ + diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/html/HTMLFormElement.h --- a/webengine/osswebengine/WebCore/html/HTMLFormElement.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/html/HTMLFormElement.h Tue Apr 27 17:46:17 2010 +0300 @@ -107,12 +107,15 @@ // FIXME: Change this to be private after getting rid of all the clients. Vector formElements; +#if PLATFORM(SYMBIAN) + bool isDoingSubmit(){return m_doingsubmit;} +#endif + class CheckedRadioButtons { public: void addButton(HTMLGenericFormElement*); void removeButton(HTMLGenericFormElement*); HTMLInputElement* checkedButtonForGroup(const AtomicString& name) const; - private: typedef HashMap NameToInputMap; OwnPtr m_nameToCheckedRadioButtonMap; diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp --- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -98,6 +98,7 @@ { m_focusableNodeList.clear(); + m_rtl = FALSE ; } WebCoreFrameBridge::~WebCoreFrameBridge() @@ -317,6 +318,7 @@ void WebCoreFrameBridge::setWritingDirectionRtl(bool isRtl) { + m_rtl = isRtl; // update rtl only for mainframe if (m_frame && m_frame == m_frame->page()->mainFrame()) { if (control(m_frame)->brCtlLayoutObserver()) diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h --- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h Tue Apr 27 17:46:17 2010 +0300 @@ -118,6 +118,9 @@ bool m_shouldCreateRenderers; Vector m_focusableNodeList; +public: + bool m_rtl; + }; @@ -129,3 +132,4 @@ + diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -790,6 +790,7 @@ TBool retryFlag = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->getRetryConnectivityFlag(); if( retryFlag ) { + m_transaction->Cancel(); //m_cancelled = false; //for flash return; } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/network/symbian/HttpPostDataSupplier.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpPostDataSupplier.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpPostDataSupplier.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -35,7 +35,7 @@ // CONSTANTS // The post is transmitted in parts. A buffer is allocated of max size to // contain the next part to be transmitted. -const TInt KPartMaxSize = 10240; +const TInt KPartMaxSize = 24576; // MACROS diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp --- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -271,12 +271,10 @@ if(!client->isLoadingPlugins()) requests.append(tmpit->first); } - //Cancel all transactions first //Submit them again for (int i=0; iHttpTransaction()->Cancel(); - requests[i]->HttpTransaction()->SubmitL(); + requests[i]->HttpTransaction()->SubmitL(); } } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -184,16 +184,16 @@ font = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight * spec.m_zoom/100, spec.m_spec.iTypeface.iName); if(spec.m_zoom != 100) { - CFont *fontAt100Zoom = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight, spec.m_spec.iTypeface.iName); + CFont *fontWithoutZoom = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, spec.m_spec.iHeight, spec.m_spec.iTypeface.iName); double zoomout = KFontZoomBeginValue; /* When width zoom ratio exceeds the expected zoom value, adjust it by reducing the font size*/ - while((font->MaxCharWidthInPixels() * 100.0)/fontAt100Zoom->MaxCharWidthInPixels() > spec.m_zoom) { + while((font->MaxCharWidthInPixels() * 100.0)/fontWithoutZoom->MaxCharWidthInPixels() > spec.m_zoom) { zoomout = zoomout - KFontZoomStepSize; ReleaseFont(font); font = AknFontAccess::GetClosestFont(*iScreenDevice, spec.m_spec.iFontStyle, (spec.m_spec.iHeight * spec.m_zoom * zoomout)/100, spec.m_spec.iTypeface.iName); } - ReleaseFont(fontAt100Zoom); + ReleaseFont(fontWithoutZoom); } } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -79,18 +79,22 @@ // lazily create the popup view PlatformFontCache* cache = StaticObjectsContainer::instance()->fontCache(); float zoomFactor = (float)cache->fontZoomFactor(); - if(!m_popup) { - // system font to be used by popup + // system font to be used by popup - float newFont = 12.0f * zoomFactor /100.0f; - FontDescription fd; - fd.setComputedSize(newFont); - //If zoom factor is greater than 120 and less than or equals 200, then make it 125 by default. This - //will make it selectable not too big. - FontPlatformData* font = new FontPlatformData(cache->zoomedFont(fd, (zoomFactor > 120)? KMaxZoomFactorForPopup : zoomFactor));; + float newFont = 12.0f * zoomFactor /100.0f; + FontDescription fd; + fd.setComputedSize(newFont); + //If zoom factor is greater than 120 and less than or equals 200, then make it 125 by default. This + //will make it selectable not too big. + FontPlatformData* font = new FontPlatformData(cache->zoomedFont(fd, (zoomFactor > 120)? KMaxZoomFactorForPopup : zoomFactor));; + if(!m_popup) { m_popup = m_callback->createFormFillPopup(font->Font()); - delete font; } + else + { + m_popup->setFont(font->Font()); + } + delete font; if (!m_popup) { return; } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/symbian/FormFillPopup.h --- a/webengine/osswebengine/WebCore/platform/symbian/FormFillPopup.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/FormFillPopup.h Tue Apr 27 17:46:17 2010 +0300 @@ -21,6 +21,8 @@ #include +// FORWARD DECLARATIONS +class CFont; namespace WebCore { class Frame; @@ -34,6 +36,7 @@ virtual void clear() = 0; virtual void setLocationHintInDoc(const TRect& r, WebCore::Frame* frame) = 0; virtual ~MFormFillPopup() {} + virtual void setFont(CFont* font) {} }; #endif //!__FORMFILLPOPUP_H__ diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp --- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -22,7 +22,6 @@ #include #include #include -#include // ======================== STATIC FACTORY FUNCTIONS =========================== @@ -474,44 +473,6 @@ gc.SetBrushStyle(CGraphicsContext::ENullBrush); TPoint off(srcPt.iX, srcPt.iY); -#ifdef BRDO_PERF_IMPROVEMENTS_ENABLED_FF - while ((bmpRect.iBr.iX - off.iX)> 2*SizeInPixels().iWidth) - { - TInt w = SizeInPixels().iWidth; - TInt h = SizeInPixels().iHeight; - TInt new_width = 2*w; - - CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; - bitmap->Create( TSize(new_width,h), iBitmap->DisplayMode() ); - - CBitmapContext* bitmapContext=NULL; - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(bitmap); - CleanupStack::PushL(bitmapDevice); - User::LeaveIfError(bitmapDevice->CreateBitmapContext(bitmapContext)); - CleanupStack::PushL(bitmapContext); - bitmapContext->BitBlt(TPoint(0,0),iBitmap); - bitmapContext->BitBlt(TPoint(w,0),iBitmap); - CleanupStack::PopAndDestroy(2); - delete iBitmap; - iBitmap = bitmap; - - if (HasMask()) - { - CFbsBitmap* mask = new (ELeave) CFbsBitmap; - mask->Create( TSize(new_width,h), iMask->DisplayMode() ); - CBitmapContext* bitmapContext=NULL; - CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(mask); - CleanupStack::PushL(bitmapDevice); - User::LeaveIfError(bitmapDevice->CreateBitmapContext(bitmapContext)); - CleanupStack::PushL(bitmapContext); - bitmapContext->BitBlt(TPoint(0,0),iMask); - bitmapContext->BitBlt(TPoint(w,0),iMask); - CleanupStack::PopAndDestroy(2); - delete iMask; - iMask = mask; - } - } -#endif for (TInt x = off.iX; xm_classId.isEmpty()) mapClassIdToServiceType(o->m_classId, serviceType); +#if PLATFORM(SYMBIAN) + //If there is no Type and Classid then return. + else if (serviceType.isEmpty() && o->m_classId.isEmpty()) + return; +#endif // If no URL and type, abort. if (url.isEmpty() && serviceType.isEmpty()) diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/formcontrols/WebFormFill.cpp --- a/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFill.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFill.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -27,6 +27,7 @@ #include "FormFillController.h" #include "FormState.h" #include "HtmlInputElement.h" +#include "HTMLFormElement.h" #include #include @@ -68,7 +69,7 @@ void WebFormFill::willSubmitForm(FormState* formState) { int formDataType = m_webView->brCtl()->settings()->brctlSetting(TBrCtlDefs::ESettingsAutoFormFillEnabled); - if (formDataType != TBrCtlDefs::EFormDataOff) { + if (formDataType != TBrCtlDefs::EFormDataOff && formState->form()->isDoingSubmit()) { StaticObjectsContainer::instance()->formFillController()->saveFormData(formState->form(), this, formDataType == TBrCtlDefs::EFormDataPlusPassword); } } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp --- a/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -46,7 +46,9 @@ static const TInt KListBoxPadding = 12; static const TInt KListBoxMinWidth = 100; static const TInt KListBoxMargin = 6; +// CONSTANTS +const static TInt KItemSpacerInPixels = 2; WebFormFillPopup* WebFormFillPopup::NewL(WebView* parent, CFont* font, MFormFillCallback* callback) { WebFormFillPopup* self = new (ELeave) WebFormFillPopup(parent, font, callback); @@ -374,4 +376,11 @@ m_parent->page()->chrome()->client()->setElementVisibilityChanged(false); } +void WebFormFillPopup::setFont(CFont* font) +{ + m_font = font; + CTextListItemDrawer* itemDrawer = (CTextListItemDrawer*) m_listBox->View()->ItemDrawer(); + itemDrawer->SetFont(font); + m_listBox->SetItemHeightL(m_font->HeightInPixels()+ KItemSpacerInPixels); +} // End of File diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.h --- a/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.h Tue Apr 27 17:46:17 2010 +0300 @@ -48,6 +48,7 @@ void invalidate(); void clear(); void setLocationHintInDoc(const TRect& r, WebCore::Frame* frame); + void setFont(CFont* font); // from CEikBorderedControl TCoeInputCapabilities InputCapabilities() const; diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp --- a/webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/group/webkit/webkit.mmp Tue Apr 27 17:46:17 2010 +0300 @@ -54,6 +54,7 @@ SOURCE WebScrollbarDrawer.cpp SOURCE WebSprite.cpp SOURCE ThumbnailGenerator.cpp +SOURCE BrCtlLayoutObserverImpl.cpp SOURCEPATH ../../FormControls diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp --- a/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -119,7 +119,7 @@ elType = ((HTMLInputElement*)ie)->checked() ? TBrCtlDefs::EElementRadioButtonSelected : TBrCtlDefs::EElementRadioButtonUnSelected; else if (ie->type() == "checkbox") elType = ((HTMLInputElement*)ie)->checked() ? TBrCtlDefs::EElementCheckBoxChecked : TBrCtlDefs::EElementCheckBoxUnChecked; - else if (ie->type() == "button" || ie->type() == "reset" || ie->type() == "submit") + else if (ie->hasLocalName( buttonTag )||ie->type() == "button" || ie->type() == "reset" || ie->type() == "submit") elType = TBrCtlDefs::EElementButton; else if (ie->type() == "file") { if (((HTMLInputElement*)ie)->value() == String()) diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/plugins/PluginHandler.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginHandler.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginHandler.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -477,6 +477,15 @@ // Loads all the plugins and query them for details. // ----------------------------------------------------------------------------- // +static void CleanupPluginInfoArray( TAny* aObj ) + { + if ( aObj ) + { + static_cast( aObj )->ResetAndDestroy(); + static_cast( aObj )->Close(); + } + } + TBool PluginHandler::loadPluginsL() { @@ -489,6 +498,7 @@ // Create the ECom info array, contains the plugin information RImplInfoPtrArray ecomPluginInfoArray; + CleanupStack::PushL(TCleanupItem(CleanupPluginInfoArray, &ecomPluginInfoArray ) ); // Get list of ECOM plugins that match the KNBrowserPluginInterfaceUid REComSession::ListImplementationsL(KBrowserPluginInterfaceUid, ecomPluginInfoArray); @@ -519,8 +529,7 @@ } // Clean up the ECom info array - ecomPluginInfoArray.ResetAndDestroy(); - ecomPluginInfoArray.Close(); + CleanupStack::PopAndDestroy( &ecomPluginInfoArray ); m_pluginsLoaded = ETrue; return EFalse; diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp --- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -1095,7 +1095,9 @@ if (m_pluginwin) { TBool visibility = isFrameVisible && !isPageViewMode && isPluginVisible; - m_pluginwin->makeVisible(visibility); + if(fullRect.Size() != TSize(0,0)) { + m_pluginwin->makeVisible(visibility); + } if (!m_pluginwin->isPluginInFullscreen() && visibility) { clipRect.Intersection(fullRect); m_pluginwin->SetRect(clipRect); diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -380,12 +380,12 @@ frame->editor()->execCommand("MoveLeft"); } m_webView->fepTextEditor()->HandleUpdateCursor(); - if (frame->selectionController()->start() != startPos && - frame->selectionController()->end() != endPos) { - event->setDefaultHandled(); + if (frame->selectionController()->start() == startPos && + frame->selectionController()->end() == endPos && !select) { + m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused()); } else { - m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused()); + event->setDefaultHandled(); } break; @@ -403,12 +403,12 @@ frame->editor()->execCommand("MoveRight"); } m_webView->fepTextEditor()->HandleUpdateCursor(); - if (frame->selectionController()->start() != startPos && - frame->selectionController()->end() != endPos) { - event->setDefaultHandled(); + if (frame->selectionController()->start() == startPos && + frame->selectionController()->end() == endPos && !select) { + m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused()); } else { - m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused()); + event->setDefaultHandled(); } break; @@ -422,12 +422,12 @@ frame->editor()->execCommand("MoveUp"); } m_webView->fepTextEditor()->HandleUpdateCursor(); - if (frame->selectionController()->start() != startPos && - frame->selectionController()->end() != endPos) { - event->setDefaultHandled(); + if (frame->selectionController()->start() == startPos && + frame->selectionController()->end() == endPos && !select) { + m_shouldEndEditing = true; } else { - m_shouldEndEditing = true; + event->setDefaultHandled(); } break; @@ -441,12 +441,12 @@ frame->editor()->execCommand("MoveDown"); } m_webView->fepTextEditor()->HandleUpdateCursor(); - if (frame->selectionController()->start() != startPos && - frame->selectionController()->end() != endPos) { - event->setDefaultHandled(); + if (frame->selectionController()->start() == startPos && + frame->selectionController()->end() == endPos && !select) { + m_shouldEndEditing = true; } else { - m_shouldEndEditing = true; + event->setDefaultHandled(); } break; diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameBridge.cpp --- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameBridge.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameBridge.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -196,7 +196,8 @@ //tot: need to fix url convert TRAP_IGNORE( pluginSkin = PluginSkin::NewL( *m_webFrame, url, paramNames, paramValues, baseUrl, mimeType, loadContent ) ); - pluginSkin->setElement(pluginElement); + if (pluginSkin) + pluginSkin->setElement(pluginElement); return pluginSkin; } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp --- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -80,6 +80,7 @@ #include "httpDownload.h" #include "BrCtlSoftkeysObserverImpl.h" #include "BrCtlSpecialLoadObserverImpl.h" +#include "WebFrameBridge.h" #include "BrCtlLayoutObserverImpl.h" #include "BrCtlWindowObserverImpl.h" #include "WidgetExtension.h" @@ -479,7 +480,7 @@ // Create and initialize the Layout Observer if (m_brCtlLayoutObserver == NULL) { - m_brCtlLayoutObserver = new (ELeave) CBrCtlLayoutObserver(); + m_brCtlLayoutObserver = new (ELeave) CBrCtlLayoutObserver(m_webView); m_ownsLayoutObserver = true; } // Create and initialize the Dialog Provider @@ -592,6 +593,10 @@ if (m_webView->formFillPopup() && m_webView->formFillPopup()->IsVisible()) m_webView->formFillPopup()->handleCommandL(TBrCtlDefs::ECommandCancel); break; + case TBrCtlDefs::EEventNewContentDisplayed: + if(m_brCtlLayoutObserver && m_webView) + m_brCtlLayoutObserver->NotifyLayoutChange( (webView()->mainFrame()->bridge()->m_rtl ? EOriginTopRight : EOriginTopLeft)); + break; case TBrCtlDefs::EEventContentFinished: case TBrCtlDefs::EEventUploadFinished: m_pageLoadFinished = true; @@ -961,7 +966,6 @@ break; } -#ifdef BRDO_OCC_ENABLED_FF case TBrCtlDefs::ECommandSetRetryConnectivityFlag: { StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->setRetryConnectivityFlag(); @@ -975,7 +979,7 @@ case TBrCtlDefs::ECommandRetryTransactions: { StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->retryTransactions(); - m_webView->reCreatePlugins(); + m_webView->mainFrame()->reCreatePlugins(); break; } case TBrCtlDefs::ECommandClearQuedTransactions: @@ -1001,8 +1005,7 @@ } break; } -#endif - + default: { if ( m_wmlEngineInterface && @@ -2527,3 +2530,4 @@ + diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h --- a/webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlLayoutObserverImpl.h Tue Apr 27 17:46:17 2010 +0300 @@ -22,6 +22,9 @@ // INCLUDES #include +// Forward Declaration +class WebView; + /** * This observer is notified of scrolling and tabbing events * @@ -62,7 +65,7 @@ * @param aNewLayout RTL or LTR * @return void */ - virtual void NotifyLayoutChange( TBrCtlLayout /*aNewLayout*/ ) {} + virtual void NotifyLayoutChange( TBrCtlLayout aNewLayout ); /** * Update the title of the page in history view @@ -72,6 +75,16 @@ */ virtual void UpdateTitleL( const TDesC& /*aTitle*/ ) {} + public: + /** + * C++ default constructor. + */ + CBrCtlLayoutObserver( WebView* aWebView ); + + private: + WebView* m_webView; + + }; #endif // BRCTLLAYOUTOBSERVERIMPL_H diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -280,28 +280,21 @@ return frameLoader()->documentLoader(); } -void WebFrame::notifyPluginsOfScrolling() -{ - Frame* coreFrame = core(this); - for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { - PassRefPtr objects = frame->document()->objects(); - for (Node* n = objects->firstItem(); n; n = objects->nextItem()) - notifyPluginOfScrolling(n->renderer()); - - PassRefPtr embeds = frame->document()->embeds(); - for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) - notifyPluginOfScrolling(n->renderer()); - - } +void WebFrame::notifyPluginsOfPositionChange() +{ + PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); + WTF::HashSet pluginObjs = plghandler->pluginObjects(); + for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { + notifyPluginOfPositionChange(static_cast (*it)); + } } -void WebFrame::notifyPluginOfScrolling(RenderObject* renderer) +void WebFrame::notifyPluginOfPositionChange(PluginSkin* plg) { - MWebCoreObjectWidget* view = widget(renderer); //Don't repaint the plugin objects if Browser is in PageView mode - if (view) { - view->positionChanged(); - TRect r = m_view->toDocCoords(static_cast(view)->getPluginWinRect()); + if (plg) { + plg->positionChanged(); + TRect r = m_view->toDocCoords(plg->getPluginWinRect()); m_view->topView()->scheduleRepaint(r); } } @@ -514,29 +507,11 @@ } void WebFrame::makeVisiblePlugins(TBool visible) -{ - MWebCoreObjectWidget* view = NULL; - int pluginCount = 0; - Frame* coreFrame = core(this); - PluginSkin* ptr = 0; - for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { - - PassRefPtr objects = frame->document()->objects(); - for (Node* n = objects->firstItem(); n; n = objects->nextItem()) { - view = widget(n); - if (view) { - ptr = static_cast(view); - ptr->makeVisible(visible); - } - } - PassRefPtr embeds = frame->document()->embeds(); - for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { - view = widget(n); - if (view) { - ptr = static_cast(view); - ptr->makeVisible(visible); - } - } +{ + PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); + WTF::HashSet pluginObjs = plghandler->pluginObjects(); + for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { + static_cast (*it)->makeVisible(visible); } } @@ -600,5 +575,15 @@ } } +void WebFrame::reCreatePlugins() +{ + PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); + WTF::HashSet pluginObjs = plghandler->pluginObjects(); + for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { + PluginSkin* plg = static_cast (*it); //->PlayPauseNotify(pause); + if(plg->activeStreams() > 0) + plg->reCreatePlugin(); + } +} // END OF FILE diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebFrame.h --- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.h Tue Apr 27 17:46:17 2010 +0300 @@ -93,11 +93,12 @@ void paintRect(WebCoreGraphicsContext& gc, const TRect& r); - void notifyPluginsOfScrolling(); - void notifyPluginOfScrolling(WebCore::RenderObject* renderer); + void notifyPluginsOfPositionChange(); + void notifyPluginOfPositionChange(PluginSkin* plg); PluginSkin* focusedPlugin(); WebFrame* frameAtPoint(const TPoint& pt_); void PlayPausePlugins(bool pause); + void reCreatePlugins(); // utility functions int imageCount(bool visibleOnly_); diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -291,7 +291,7 @@ if (aPoint != m_contentPos) { TPoint p(nearestPointInFrame(aPoint)); m_contentPos = p; - m_frame->notifyPluginsOfScrolling(); + m_frame->notifyPluginsOfPositionChange(); m_topView->syncRepaint( TRect(0,0,KMaxTInt/2,KMaxTInt/2) ); } } @@ -326,7 +326,7 @@ m_contentPos = p; - m_frame->notifyPluginsOfScrolling(); + m_frame->notifyPluginsOfPositionChange(); if( m_topView->pageScaler() && m_topView->pageScaler()->Visible()) diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -324,8 +324,7 @@ if (aPointerEvent.iType == TPointerEvent::EButton1Down && m_webview->viewIsScrolling()) { WebScrollingDeceleratorGH* scrollDecelGH = m_webview->pageScrollHandler()->ScrollingDeceleratorGH(); if(scrollDecelGH) { - scrollDecelGH->cancelDecel(); - m_webview->setViewIsScrolling(false); + scrollDecelGH->cancelDecel(); } } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebView.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -133,10 +133,14 @@ const int defaultCacheCapacity = 256 * 1024; const int KMaxMissedDrawsAllowed = 5;//Max missed repaint allowed before paint happens +const int KCheckerSize = 10; +const int KZoomFgRectColor = 150; +const int KCheckerBoardDestroyTimeout = 2*1000*1000; // LOCAL FUNCTION PROTOTYPES TInt doRepaintCb( TAny* ptr ); TInt doFepCb( TAny* ptr ); +TInt doDestroyCheckerBoardCb(TAny *ptr); static WebFrame* incrementFrame(WebFrame* curr, bool forward, bool wrapFlag) { @@ -208,6 +212,11 @@ , m_drawsMissed(0) , m_scroll(false) , m_thumbnailGenerator(NULL) +, m_checkerBoardBitmap(NULL) +, m_checkerBoardDevice(NULL) +, m_checkerBoardGc(NULL) +, m_checkerBoardDestroyTimer(NULL) +, m_isPinchZoomOut(false) { } @@ -261,6 +270,10 @@ delete m_bridge; delete m_frameView; delete m_thumbnailGenerator; + + destroyCheckerBoard(); + delete m_checkerBoardDestroyTimer; + } // ----------------------------------------------------------------------------- @@ -380,15 +393,13 @@ MakeViewVisible(ETrue); m_isPluginsVisible=ETrue; CCoeControl::SetFocus(ETrue); - -#if defined(BRDO_MULTITOUCH_ENABLED_FF) && !defined (__WINSCW__) - //Enable advance pointer info for multi-touch. - Window().EnableAdvancedPointers(); -#endif cache()->setCapacities(0, 0, defaultCacheCapacity); m_waiter = new(ELeave) CActiveSchedulerWait(); + + m_checkerBoardDestroyTimer = CPeriodic::NewL(CActive::EPriorityIdle); + } void WebView::initializePageScalerL() @@ -426,30 +437,17 @@ } } else { +#ifndef BRDO_MULTITOUCH_ENABLED_FF gc.DrawBitmap( m_destRectForZooming, StaticObjectsContainer::instance()->webSurface()->offscreenBitmap(), m_srcRectForZooming ); if ( m_startZoomLevel > m_currentZoomLevel) { -#ifdef BRDO_MULTITOUCH_ENABLED_FF - TInt destRectWidth = m_destRectForZooming.Width(); - TInt destRectHeight = m_destRectForZooming.Height(); - TRect rectLeft(TPoint(rect.iTl), - TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iBr.iY)); - - TRect rectRight(TPoint(rect.iTl.iX + destRectWidth + m_destRectForZooming.iTl.iX, rect.iTl.iY), - TPoint(rect.iBr)); - - TRect rectTop(TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iTl.iY), - TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX + destRectWidth, rect.iTl.iY + m_destRectForZooming.iTl.iY)); - - TRect rectBottom(TPoint(rect.iTl.iX + m_destRectForZooming.iTl.iX, rect.iTl.iY + m_destRectForZooming.iTl.iY + destRectHeight), - TPoint(rect.iTl.iX + destRectWidth + m_destRectForZooming.iTl.iX, rect.iBr.iY)); -#else + TRect rectLeft( TPoint( rect.iTl.iX + m_destRectForZooming.Width() - 2, rect.iTl.iY ), - TPoint( rect.iBr )); + TPoint( rect.iBr )); TRect rectBottom( TPoint( rect.iTl.iX, rect.iTl.iY + m_destRectForZooming.Height() - 2 ), - TPoint( rect.iBr.iX + m_destRectForZooming.Width(), rect.iBr.iY )); -#endif + TPoint( rect.iBr.iX + m_destRectForZooming.Width(), rect.iBr.iY )); + const TRgb colorTest(KZoomBgRectColor,KZoomBgRectColor,KZoomBgRectColor); gc.SetPenColor(colorTest); @@ -457,13 +455,13 @@ gc.SetBrushColor(colorTest); gc.DrawRect( rectLeft ); gc.DrawRect( rectBottom ); -#ifdef BRDO_MULTITOUCH_ENABLED_FF - gc.DrawRect( rectRight ); - gc.DrawRect( rectTop ); -#endif - } - +#else + if ( m_startZoomLevel > m_currentZoomLevel) { + gc.BitBlt(rect.iTl,m_checkerBoardBitmap); + } + gc.DrawBitmap( m_destRectForZooming, StaticObjectsContainer::instance()->webSurface()->offscreenBitmap(), m_srcRectForZooming ); +#endif } if (m_pageScalerEnabled && m_pageScaler->Visible()) { @@ -582,6 +580,21 @@ if(m_widgetextension && !(m_widgetextension->IsWidgetPublising())) { zoomLevelChanged( KZoomLevelDefaultValue ); } + else { + //Layout the content based on Default zoom level (100) and zoom it back to existing zoom + //level after the layout is complete + WebFrameView* view = mainFrame()->frameView(); + if(view) { + m_startZoomLevel = KZoomLevelDefaultValue; + mainFrame()->scalingFactorChanged(KZoomLevelDefaultValue); + TRect currentZoomedRect = view->rect(); + TRect rectWithDefaultZoom; + calculateZoomRect(currentZoomedRect, rectWithDefaultZoom, m_currentZoomLevel, KZoomLevelDefaultValue); + view->setRect(rectWithDefaultZoom); + m_currentZoomLevel = KZoomLevelDefaultValue; + } + } + Frame* f = m_page->mainFrame(); while ( f ) { @@ -604,7 +617,20 @@ mainFrame()->frameView()->draw( *m_webcorecontext, rect ); if ( zoomLevel < m_minZoomLevel ) zoomLevel = m_minZoomLevel; zoomLevelChanged( zoomLevel ); + +#ifndef BRDO_MULTITOUCH_ENABLED_FF + if(m_pageZoomHandler) { + //Slider value will change if the content size is changed when layout is done + //hide the slider, so that user will get new min and max zoom level + if (m_pageZoomHandler->isActive()) { + TRAP_IGNORE( + m_pageZoomHandler->hideZoomSliderL(); + ); + } + } +#endif } + mainFrame()->notifyPluginsOfPositionChange(); } //------------------------------------------------------------------------------- // WebView::syncRepaint @@ -792,7 +818,10 @@ TPoint ptCurr = mainFrame()->frameView()->contentPos(); if ( ptCurr != ptFromHistory ) { - if ( ptInit == ptCurr ) { + if((mainFrame()->bridge()->m_rtl) && (ptInit != ptFromHistory)) { + mainFrame()->frameView()->scrollTo(ptFromHistory); + } + else if ( ptInit == ptCurr ) { mainFrame()->frameView()->scrollTo(ptFromHistory); } else { @@ -2281,7 +2310,7 @@ m_dirtyZoomMode = false; clearOffScreenBitmap(); zoomLevelChanged(zoomLevel); - mainFrame()->notifyPluginsOfScrolling(); + mainFrame()->notifyPluginsOfPositionChange(); m_isPluginsVisible = false; mainFrame()->makeVisiblePlugins(true); m_isPluginsVisible = true; @@ -2354,6 +2383,12 @@ newMinZoomLevel = KZoomLevelDefaultValue; } #ifndef BRDO_MULTITOUCH_ENABLED_FF + //if the min zoom is in fraction (like 86.33) this will give us 6 pixel white patch + //to reduce the patch, always min zoom factor incremented in one step of zoom step + if(newMinZoomLevel % KZoomLevelMinValue) + { + newMinZoomLevel += KZoomLevelMinValue; + } newMinZoomLevel = (newMinZoomLevel/m_pageZoomHandler->stepSize())*m_pageZoomHandler->stepSize(); #endif TBool needsUpdateArray = EFalse; @@ -2467,31 +2502,13 @@ mainFrame()->frameView()->setContentPos(cpos); } m_isPinchZoom = false; + m_isPinchZoomOut = false; } TRect rect = view->rect(); - - TInt tlx = (rect.iTl.iX * currZoomLevel) / m_currentZoomLevel; - TInt tly = (rect.iTl.iY * currZoomLevel) / m_currentZoomLevel; - TInt brx = (rect.iBr.iX * currZoomLevel) / m_currentZoomLevel; - TInt bry = (rect.iBr.iY * currZoomLevel) / m_currentZoomLevel; - - // rounding - - if (( rect.iTl.iX * currZoomLevel) % m_currentZoomLevel ){ - tlx -= 1; - } - if (( rect.iTl.iY * currZoomLevel) % m_currentZoomLevel ){ - tly -= 1; - } - if ((rect.iBr.iX * currZoomLevel) % m_currentZoomLevel ){ - brx += 1; - } - if ((rect.iBr.iY * currZoomLevel) % m_currentZoomLevel ){ - bry += 1; - } - - view->setRect(TRect(tlx, tly, brx, bry)); + TRect rectToZoom; + calculateZoomRect(rect, rectToZoom, currZoomLevel, m_currentZoomLevel); + view->setRect(rectToZoom); // now just do a repaint, should be very fast if ( currZoomLevel > newZoomLevel ) { @@ -2566,7 +2583,7 @@ m_lastZoomLevel = m_currentZoomLevel; setZoomLevel(zoomLevel); - mainFrame()->notifyPluginsOfScrolling(); + mainFrame()->notifyPluginsOfPositionChange(); if (zoomLevel == KZoomLevelDefaultValue) { @@ -2848,7 +2865,7 @@ m_isPluginsVisible = !m_viewIsFastScrolling; if (!m_viewIsFastScrolling) { - mainFrame()->notifyPluginsOfScrolling(); + mainFrame()->notifyPluginsOfPositionChange(); } toggleRepaintTimer(!m_viewIsFastScrolling); } @@ -2908,7 +2925,7 @@ view->setContentPos(cp); } //setZoomLevel(zoomLevel); - mainFrame()->notifyPluginsOfScrolling(); + mainFrame()->notifyPluginsOfPositionChange(); } @@ -3016,9 +3033,9 @@ } //------------------------------------------------------------------------------- -// WebView::setPinchBitmapZoomLevel +// WebView::setPinchBitmapZoomLevelL //------------------------------------------------------------------------------- -void WebView::setPinchBitmapZoomLevel(int zoomLevel) +void WebView::setPinchBitmapZoomLevelL(int zoomLevel) { m_zoomLevelChangedByUser = true; m_dirtyZoomMode = true; @@ -3029,7 +3046,8 @@ setPinchBitmapZoomIn(zoomLevel); } else { - setPinchBitmapZoomOut(zoomLevel); + setPinchBitmapZoomOutL(zoomLevel); + m_isPinchZoomOut = true; } m_currentZoomLevel = zoomLevel; DrawNow(); @@ -3077,9 +3095,9 @@ //------------------------------------------------------------------------------- -// WebView::setPinchBitmapZoomOut +// WebView::setPinchBitmapZoomOutL //------------------------------------------------------------------------------- -void WebView::setPinchBitmapZoomOut(int zoomLevel) +void WebView::setPinchBitmapZoomOutL(int zoomLevel) { TPoint pinchCenter = m_pinchZoomHandler->pinchCenter(); @@ -3109,40 +3127,127 @@ //get the shift in the document so that during the next engine re-draw, the origin needs to be updated based on that m_pinchDocDelta.iX = (float)shiftInView.iX * 100 / zoomLevel; m_pinchDocDelta.iY = (float)shiftInView.iY * 100 / zoomLevel; + + if(!m_isPinchZoomOut) + createCheckerBoardL(); } -void WebView::reCreatePlugins() -{ - Frame* coreFrame = core(mainFrame()); - MWebCoreObjectWidget* view = NULL; - for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { - PassRefPtr objects = frame->document()->objects(); - for (Node* n = objects->firstItem(); n; n = objects->nextItem()) { - view = widget(n); - if (view) { - PluginSkin* plg = static_cast(view); - if(plg->activeStreams() > 0) - plg->reCreatePlugin(); - } - } - - PassRefPtr embeds = frame->document()->embeds(); - for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { - view = widget(n); - if (view) { - PluginSkin* plg = static_cast(view); - if(plg->activeStreams() > 0) - plg->reCreatePlugin(); - } - } - } -} - - void WebView::setScrolling(bool scroll) { m_scroll = scroll; mainFrame()->PlayPausePlugins(m_scroll); } +void drawCheckerBoard(CBitmapContext *gc,const TRect &rect) +{ + for(int i = rect.iTl.iX; i <= (rect.iTl.iX + rect.Width()); i = i + (2 * KCheckerSize)) { + for(int j = rect.iTl.iY; j <= (rect.iTl.iY + rect.Height()); j = j + (2 * KCheckerSize)) { + const TRgb lightGrey(KZoomBgRectColor, KZoomBgRectColor, KZoomBgRectColor); + gc->SetPenColor(lightGrey); + gc->SetBrushColor(lightGrey); + + TRect topLeft(TPoint(i, j),TPoint(i + KCheckerSize, j + KCheckerSize)); + gc->DrawRect(topLeft); + + TRect bottomRight(TPoint(i + KCheckerSize, j + KCheckerSize),TPoint(i + (2 * KCheckerSize), j + (2 * KCheckerSize))); + gc->DrawRect(bottomRight); + + const TRgb darkGrey(KZoomFgRectColor, KZoomFgRectColor, KZoomFgRectColor); + gc->SetPenColor(darkGrey); + gc->SetBrushColor(darkGrey); + + TRect topRight(TPoint(i + KCheckerSize, j),TPoint(i + (2 * KCheckerSize), j + KCheckerSize)); + gc->DrawRect(topRight); + + TRect bottomLeft(TPoint(i, j + KCheckerSize),TPoint(i + KCheckerSize, j + (2 * KCheckerSize))); + gc->DrawRect(bottomLeft); + } + } +} + +void WebView::createCheckerBoardL() +{ + //Cancel the destroy timer, if it is already scheduled. + //Otherwise it will destroy the checkerboard created now. + if(m_checkerBoardDestroyTimer + && m_checkerBoardDestroyTimer->IsActive()) + m_checkerBoardDestroyTimer->Cancel(); + + if(m_checkerBoardBitmap && m_checkerBoardBitmap->SizeInPixels()!=Rect().Size()) { + destroyCheckerBoard(); + } + + if(!m_checkerBoardBitmap) { + m_checkerBoardBitmap =new(ELeave) CFbsBitmap; + TInt err= m_checkerBoardBitmap->Create(Rect().Size(),StaticObjectsContainer::instance()->webSurface()->displayMode()); + User::LeaveIfError(err); + + m_checkerBoardDevice = CFbsBitmapDevice::NewL(m_checkerBoardBitmap); + + err = m_checkerBoardDevice->CreateContext(m_checkerBoardGc); + User::LeaveIfError(err); + + m_checkerBoardGc->SetBrushStyle( CGraphicsContext::EForwardDiagonalHatchBrush ); + drawCheckerBoard(m_checkerBoardGc,Rect()); + } +} + +void WebView::destroyCheckerBoard() +{ + if(m_checkerBoardBitmap) { + delete m_checkerBoardGc; + delete m_checkerBoardDevice; + delete m_checkerBoardBitmap; + + m_checkerBoardBitmap = NULL; + m_checkerBoardDevice = NULL; + m_checkerBoardGc = NULL; + } + if(m_checkerBoardDestroyTimer + && m_checkerBoardDestroyTimer->IsActive()) + m_checkerBoardDestroyTimer->Cancel(); +} + +TInt doDestroyCheckerBoardCb(TAny *ptr) +{ + static_cast(ptr)->destroyCheckerBoard(); + return ETrue; +} + +void WebView::startCheckerBoardDestroyTimer() +{ + if(!m_checkerBoardDestroyTimer || !m_checkerBoardBitmap) { + return; + } + if(m_checkerBoardDestroyTimer->IsActive()) { + m_checkerBoardDestroyTimer->Cancel(); + } + m_checkerBoardDestroyTimer->Start(KCheckerBoardDestroyTimeout,0,TCallBack(doDestroyCheckerBoardCb,this)); +} + +//------------------------------------------------------------------------------- +// WebView::calculateZoomRect +//------------------------------------------------------------------------------- +void WebView::calculateZoomRect(TRect &aOldRect, TRect &aNewRect, TInt aOldZoom, TInt aNewZoom) + { + aNewRect.iTl.iX = (aOldRect.iTl.iX * aOldZoom) / aNewZoom; + aNewRect.iTl.iY = (aOldRect.iTl.iY * aOldZoom) / aNewZoom; + aNewRect.iBr.iX = (aOldRect.iBr.iX * aOldZoom) / aNewZoom; + aNewRect.iBr.iY = (aOldRect.iBr.iY * aOldZoom) / aNewZoom; + + // rounding + if (( aOldRect.iTl.iX * aNewZoom) % aOldZoom ) { + aNewRect.iTl.iX -= 1; + } + if (( aOldRect.iTl.iY * aNewZoom) % aOldZoom ) { + aNewRect.iTl.iY -= 1; + } + if ((aOldRect.iBr.iX * aNewZoom) % aOldZoom ) { + aNewRect.iBr.iX += 1; + } + if ((aOldRect.iBr.iY * aNewZoom) % aOldZoom ) { + aNewRect.iBr.iY += 1; + } + } + // END OF FILE diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebView.h --- a/webengine/osswebengine/WebKit/s60/webview/WebView.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebView.h Tue Apr 27 17:46:17 2010 +0300 @@ -355,7 +355,7 @@ /** * To set the Bitmap zooming for Pinch */ - void setPinchBitmapZoomLevel(int zoomLevel); + void setPinchBitmapZoomLevelL(int zoomLevel); /** * To set the Bitmap zooming In for Pinch @@ -365,14 +365,24 @@ /** * To set the Bitmap zooming Out for Pinch */ - void setPinchBitmapZoomOut(int zoomLevel); + void setPinchBitmapZoomOutL(int zoomLevel); + + TBool isPinchZoom() {return m_isPinchZoom; } /** - * Recreate Plugins in case of Retry Connection - */ - void reCreatePlugins(); + * Creates the checkerboard + */ + void createCheckerBoardL(); - TBool isPinchZoom() {return m_isPinchZoom; } + /** + * Destroys the checkerboard + */ + void destroyCheckerBoard(); + + /** + * Starts the checkerboard timer. End of this timer, checkerboard will be destroyed. + */ + void startCheckerBoardDestroyTimer(); void setScrolling(bool scroll); @@ -501,7 +511,7 @@ void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); void setFocusedNodeUnderCursor(WebCore::Frame* frame); void waitTimerCB(WebCore::Timer* t); - + void calculateZoomRect(TRect &aOldRect, TRect &aNewRect, TInt aOldZoom, TInt aNewZoom); public: void sendMouseEventToEngine(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame); void fepTimerFired(WebCore::Timer*); @@ -597,7 +607,6 @@ WebPageFullScreenHandler* m_pageFullScreenHandler; // owned bool m_viewIsScrolling; bool m_viewIsFastScrolling; - bool m_scroll; // synchronous requests bool m_synchRequestPending; @@ -615,7 +624,16 @@ TBool m_isPinchZoom; TRealPoint m_pinchDocDelta; int m_drawsMissed; + bool m_scroll; CThumbnailGenerator* m_thumbnailGenerator; + + CFbsBitmap *m_checkerBoardBitmap; + CFbsBitmapDevice *m_checkerBoardDevice; + CFbsBitGc *m_checkerBoardGc; + + CPeriodic *m_checkerBoardDestroyTimer; + + TBool m_isPinchZoomOut; }; #endif diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/webkit/s60/webview/BrCtlLayoutObserverImpl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/webengine/osswebengine/webkit/s60/webview/BrCtlLayoutObserverImpl.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Handle scrollbar and tab events +* +*/ + + +// INCLUDES + +#include <../bidi.h> +#include "BrCtlLayoutObserverImpl.h" +#include "WebView.h" +#include "WebFrame.h" +#include "WebFrameView.h" +#include "BrCtl.h" + +#include "Page.h" +#include "FocusController.h" +#include "Frame.h" +#include + +using namespace WebCore; + +// ----------------------------------------------------------------------------- +// CBrCtlLayoutObserver::CBrCtlLayoutObserver +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CBrCtlLayoutObserver::CBrCtlLayoutObserver( WebView* aWebView) + : m_webView(aWebView) + { + + } + +// ----------------------------------------------------------------------------- +// CBrCtlLayoutObserver::NotifyLayoutChange +// Inform the layout of the page: right to left or left to right. +// Useful when the application draws the scrollbar itself. +// ----------------------------------------------------------------------------- +// +void CBrCtlLayoutObserver::NotifyLayoutChange( TBrCtlLayout aNewLayout ) + { + if(!m_webView) + return; + + TSize contentSize = m_webView->mainFrame()->frameView()->contentSize(); + + switch(aNewLayout) + { + case EOriginTopRight: + m_webView->mainFrame()->frameView()->scrollTo(TPoint(contentSize.iWidth,0)); + break; + + case EOriginTopLeft: + { + TPoint ptInit(0,0); + TPoint ptFromHistory = m_webView->brCtl()->historyHandler()->historyController()->currentEntryPosition(); + TPoint ptCurr = m_webView->mainFrame()->frameView()->contentPos(); + + if ( ptCurr != ptFromHistory ) { + if ( ptInit == ptCurr ) { + m_webView->mainFrame()->frameView()->scrollTo(ptFromHistory); + } + else{ + m_webView->mainFrame()->frameView()->scrollTo(TPoint(0,0)); + } + } + } + break; + + default: + break; + } + } diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp --- a/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/webkit/s60/webview/WebGestureInterface.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -29,7 +29,7 @@ const TInt TOUCH_AREA_TIMEOUT = 200; const TInt TOUCH_TIME_AREA_TIMEOUT = 0; -const TInt HOLD_AREA_TIMEOUT = 2000; +const TInt HOLD_AREA_TIMEOUT = 1500; const TInt DOUBLE_TAP_TIMEOUT = 400; const TInt SUPPRESS_TIMEOUT = 0; const TInt MOVE_SUPPRESS_TIMEOUT = 0; diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp --- a/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -161,7 +161,7 @@ if (zoomStepSize < 0) m_zoomOutBaseLevel = currentZoom / 2; } if (!(zoomStepSize < 0 && zoomValue < m_zoomOutBaseLevel)) - setZoomLevel(zoomValue); + setZoomLevelL(zoomValue); } } @@ -183,15 +183,15 @@ } // ----------------------------------------------------------------------------- -// setZoomLevel +// setZoomLevelL // ----------------------------------------------------------------------------- -void WebPagePinchZoomHandler::setZoomLevel(int zoomLevel) +void WebPagePinchZoomHandler::setZoomLevelL(int zoomLevel) { if (m_isPluginsVisible) { m_webView->mainFrame()->makeVisiblePlugins(false); m_isPluginsVisible = false; } - m_webView->setPinchBitmapZoomLevel(zoomLevel); + m_webView->setPinchBitmapZoomLevelL(zoomLevel); } // ----------------------------------------------------------------------------- @@ -221,7 +221,7 @@ { pluginskin->setPluginWinClipedRect(); } - + m_webView->startCheckerBoardDestroyTimer(); } // ----------------------------------------------------------------------------- diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.h --- a/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.h Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.h Tue Apr 27 17:46:17 2010 +0300 @@ -78,7 +78,7 @@ /** * to set the zoom level for bitmap zooming **/ - void setZoomLevel(TInt zoomLevel); + void setZoomLevelL(TInt zoomLevel); /** * to update the bitmap diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp --- a/webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/wmlengine/src/image/src/Epoc32SimpleImage.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -771,7 +771,7 @@ { // The new bitmap and mask have no dependancy on the old; just replace the old // with the new. - if(image->bitmap){ + if(image->bitmap && bitmap){ TInt bitmapHandle = bitmap->Handle(); CFbsBitmap* pBitmap = (CFbsBitmap*)image->bitmap; pBitmap->Duplicate(bitmapHandle); @@ -780,7 +780,7 @@ image->bitmap = bitmap; } - if(image->mask){ + if(image->mask && mask){ TInt bitmapHandle = mask->Handle(); CFbsBitmap* pBitmask = (CFbsBitmap*)image->mask; pBitmask->Duplicate(bitmapHandle); diff -r ac77f89b1d9e -r 4917f9bf7995 widgets/widgetapp/group/WidgetUi.mmp --- a/widgets/widgetapp/group/WidgetUi.mmp Wed Apr 14 17:06:56 2010 +0300 +++ b/widgets/widgetapp/group/WidgetUi.mmp Tue Apr 27 17:46:17 2010 +0300 @@ -112,6 +112,11 @@ LIBRARY ImageConversion.lib LIBRARY ecom.lib // for schemeHandler LIBRARY MemMan.lib +LIBRARY centralrepository.lib + +#ifdef BRDO_MULTITOUCH_ENABLED_FF +LIBRARY gfxtrans.lib +#endif #ifdef BRDO_WRT_HS_FF LIBRARY liwservicehandler.lib diff -r ac77f89b1d9e -r 4917f9bf7995 widgets/widgetapp/inc/WidgetUiWindow.h --- a/widgets/widgetapp/inc/WidgetUiWindow.h Wed Apr 14 17:06:56 2010 +0300 +++ b/widgets/widgetapp/inc/WidgetUiWindow.h Tue Apr 27 17:46:17 2010 +0300 @@ -27,6 +27,10 @@ #include #include "WidgetUiObserver.h" +#ifdef BRDO_OCC_ENABLED_FF +#include +#endif + // CONSTANTS enum TWidgetAccessGrant { @@ -85,6 +89,9 @@ public MWidgetCallback, public MBrCtlSpecialLoadObserver, public MAknServerAppExitObserver +#ifdef BRDO_OCC_ENABLED_FF + ,public MConnectionStageObserver +#endif { public: @@ -231,7 +238,28 @@ void HandleServerAppExit( TInt aReason ); - +#ifdef BRDO_OCC_ENABLED_FF + protected: // from MConnectionStageObserver + + /** + * Connection stage achieved. + */ + void ConnectionStageAchievedL(); + public: + + //Retry flags + void SetRetryFlag(TBool flag); + TBool GetRetryFlag(); + + //For Call back for reconnectivity + static TInt RetryConnectivity(TAny* aCBrowserAppUi); + TInt RetryInternetConnection(); + + CPeriodic *iRetryConnectivity; + TBool reConnectivityFlag; + void ConnNeededStatusL( TInt aErr ); + void StopConnectionObserving(); +#endif public: // new functions /** @@ -331,7 +359,7 @@ * @since 3.1 * @return void */ - void Relayout( ); + void RelayoutL(TInt aType=0 ); /** * SetCurrentWindow @@ -618,7 +646,10 @@ TBool iNeedToNotifyNetworkState; TBool iConnecting; TBool iDeleteItself; - CAsyncCallBack* iAsyncCallBack; + CAsyncCallBack* iAsyncCallBack; +#ifdef BRDO_OCC_ENABLED_FF + CConnectionStageNotifierWCB* iConnStageNotifier; +#endif }; #endif // diff -r ac77f89b1d9e -r 4917f9bf7995 widgets/widgetapp/src/WidgetUiAppUi.cpp --- a/widgets/widgetapp/src/WidgetUiAppUi.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/widgets/widgetapp/src/WidgetUiAppUi.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -288,7 +288,7 @@ CAknViewAppUi::HandleResourceChangeL( aType ); if ( aType == KEikDynamicLayoutVariantSwitch && iWindowManager && iWindowManager->ActiveWindow()) { - iWindowManager->ActiveWindow()->Relayout(); + iWindowManager->ActiveWindow()->RelayoutL( aType ); } } diff -r ac77f89b1d9e -r 4917f9bf7995 widgets/widgetapp/src/WidgetUiWindow.cpp --- a/widgets/widgetapp/src/WidgetUiWindow.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/widgets/widgetapp/src/WidgetUiWindow.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -42,6 +42,11 @@ #include #include "SWInstWidgetUid.h" +#ifdef RD_SCALABLE_UI_V2 +#include +#include +#endif //RD_SCALABLE_UI_V2 + // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES @@ -51,6 +56,7 @@ const TUint KWmlNoDefaultAccessPoint = KMaxTUint; // see cenrep setting default -1 as int, here as uint const TUint KWmlNoDefaultSnapId = KMaxTUint; // see cenrep setting default -1 as int, here as uint +const TInt KRetryConnectivityTimeout( 2*1000*1000 ); // 2 seconds // MACROS @@ -197,6 +203,12 @@ // determine initial widget online/offline network state DetermineNetworkState(); iAsyncCallBack = new (ELeave) CAsyncCallBack(TCallBack(DeleteItself,this),CActive::EPriorityUserInput); +#ifdef BRDO_OCC_ENABLED_FF + iConnStageNotifier = CConnectionStageNotifierWCB::NewL(); + //this is required, browser's connection oberver should be hit first. (incase of netscape plgins, transactions will be closed.) + iConnStageNotifier->SetPriority(CActive::EPriorityHigh); + iRetryConnectivity = CPeriodic::NewL(CActive::EPriorityStandard); +#endif } // ----------------------------------------------------------------------------- @@ -497,15 +509,33 @@ } // ----------------------------------------------------------------------------- -// CWidgetUiWindow::Relayout() +// CWidgetUiWindow::RelayoutL( TInt aType ) // switch the display orientation based on preferred setting // // ----------------------------------------------------------------------------- // -void CWidgetUiWindow::Relayout( ) +void CWidgetUiWindow::RelayoutL( TInt aType ) { if (iIsCurrent) { +#ifdef RD_SCALABLE_UI_V2 + if(aType == KEikDynamicLayoutVariantSwitch) + { + CRepository* iSensor = CRepository::NewLC(KCRUidSensorSettings); + TInt sensorOn = 0; + //get sensor is on/off from general settings + iSensor->Get(KSenSettingsSensorsOn, sensorOn); + if(sensorOn == 0) + { + TRect rec = iWindowManager.View()->Container()->Rect(); + if( rec.Height() < rec.Width()) + iPreferredOrientation = TBrCtlDefs::EOrientationLandscape; + else + iPreferredOrientation = TBrCtlDefs::EOrientationPortrait; + } + CleanupStack::PopAndDestroy(); + } +#endif // RD_SCALABLE_UI_V2 SetDisplayMode(iPreferredOrientation); SetSoftkeysVisible(iShowSoftkeys); //iWindowManager.View()->Container()->SizeChanged(); @@ -531,7 +561,7 @@ UpdateCba(); Engine()->MakeVisible( iWidgetLoaded ); // redraw incase the orientation changed while in the background - Relayout(); + RelayoutL(); } else { @@ -910,6 +940,13 @@ TApBearerType* aBearerType ) { +#ifdef BRDO_OCC_ENABLED_FF + TBool retryFlag = GetRetryFlag(); + if( retryFlag ) + { + return; + } +#endif // default in case connection setup fails *aConnectionPtr = 0; @@ -1272,5 +1309,107 @@ p->ExitNow(); return 0; } + +#ifdef BRDO_OCC_ENABLED_FF +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::ConnectionStageAchievedL() +// ----------------------------------------------------------------------------- +// +void CWidgetUiWindow::ConnectionStageAchievedL() + { + iWindowManager.GetConnection()->Disconnect(); + + TRAP_IGNORE( Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) ); + SetRetryFlag(ETrue); + + if( iRetryConnectivity && iRetryConnectivity->IsActive()) + { + iRetryConnectivity->Cancel(); + } + iRetryConnectivity->Start(KRetryConnectivityTimeout, 0,TCallBack(RetryConnectivity,this)); + + } + +void CWidgetUiWindow::ConnNeededStatusL( TInt aErr ) + { + StopConnectionObserving(); //Need to stop the connection observer first + + + if ( !iConnStageNotifier->IsActive() ) + { + TName* connectionName = iWindowManager.GetConnection()->ConnectionNameL(); + CleanupStack::PushL( connectionName ); + + iConnStageNotifier->StartNotificationL(connectionName, KLinkLayerClosed, this); + + CleanupStack::PopAndDestroy(); //connectionName + } + } +void CWidgetUiWindow::StopConnectionObserving() + { + + if ( iConnStageNotifier && iConnStageNotifier->IsActive() ) + { + iConnStageNotifier->Cancel(); + } + } + +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::SetRetryFlag +// ----------------------------------------------------------------------------- +// +void CWidgetUiWindow::SetRetryFlag(TBool flag) + { + reConnectivityFlag = flag; + } +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::RetryConnectivity +// ----------------------------------------------------------------------------- +// +TInt CWidgetUiWindow::RetryConnectivity(TAny* aWidgetUiWindow) + { + + TInt err = ((CWidgetUiWindow*)aWidgetUiWindow)->RetryInternetConnection(); + return err; + } +TInt CWidgetUiWindow::RetryInternetConnection() + { + //First cancel the timer + if ( iRetryConnectivity && iRetryConnectivity->IsActive() ) + { + iRetryConnectivity->Cancel(); + } + TInt err = KErrNone; + if ( !iWindowManager.GetConnection()->Connected() ) + { + TRAP_IGNORE( err = iWindowManager.GetConnection()->StartConnectionL( ETrue ) ); + } + if( err == KErrNone ) + { + + TRAP_IGNORE( Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandUnSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) ); + SetRetryFlag(EFalse); + + TRAP_IGNORE(ConnNeededStatusL(err)); //Start the observer again + TRAP_IGNORE( Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandRetryTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) ); + } + else + { + TRAP_IGNORE( Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandUnSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) ); + SetRetryFlag(EFalse); + TRAP_IGNORE(Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandClearQuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) ); + } + + return err; + } +// ----------------------------------------------------------------------------- +// CWidgetUiWindow::GetRetryFlag +// ----------------------------------------------------------------------------- +// + TBool CWidgetUiWindow::GetRetryFlag() + { + return reConnectivityFlag; + } +#endif // End of file diff -r ac77f89b1d9e -r 4917f9bf7995 widgets/widgetapp/src/WidgetUiWindowManager.cpp --- a/widgets/widgetapp/src/WidgetUiWindowManager.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/widgets/widgetapp/src/WidgetUiWindowManager.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -46,6 +46,11 @@ #include #include +#ifdef BRDO_MULTITOUCH_ENABLED_FF +#include +#include +#endif + #ifdef BRDO_OCC_ENABLED_FF #include #endif @@ -346,6 +351,9 @@ { // If we don't have window we know that WidgetUI has died // We must enable miniview state +#ifdef BRDO_MULTITOUCH_ENABLED_FF + GfxTransEffect::BeginFullScreen(AknTransEffect::EApplicationStart,TRect(0,0,0,0),AknTransEffect::EParameterType,AknTransEffect::GfxTransParam(TUid::Uid(KWidgetAppUid))); +#endif if( !GetWindow(aUid)) { needToNotify = EFalse; @@ -355,6 +363,9 @@ //WidgetLauncher modified to bring app to foreground GetWindow( aUid)->IncrementClickCount(); OpenOrCreateWindowL( aUid, LaunchFullscreen ); +#ifdef BRDO_MULTITOUCH_ENABLED_FF + GfxTransEffect::EndFullScreen(); +#endif } break; case WidgetOnline: @@ -801,7 +812,9 @@ #ifdef BRDO_WRT_HS_FF iCpsPublisher->ClearScreenshotL(*(GetWindow(aUid )->WidgetBundleId()), aUid.iUid); #endif - +#ifdef BRDO_MULTITOUCH_ENABLED_FF + GfxTransEffect::BeginFullScreen(AknTransEffect::EApplicationExit,TRect(0,0,0,0),AknTransEffect::EParameterType,AknTransEffect::GfxTransParam(TUid::Uid(KWidgetAppUid))); +#endif // make widgets act like separate applications by pushing to background // this way user is sent back to app shell or idle to run another widget iAppUi.SendAppToBackground();