--- a/browserutilities/browserdialogsprovider/Src/BrowserUploadProgressNote.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/browserdialogsprovider/Src/BrowserUploadProgressNote.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -86,6 +86,10 @@
//
void CBrowserUploadProgressNote::UpdateL( TInt aChunkSize )
{
+ //In access point roaming scenarios, aChunkSize will come as "0" (zero) in between uploading files, as we start upload again from begining.
+ if( aChunkSize == 0)
+ iUploaded = 0;
+
iUploaded+=aChunkSize; // Set the uploaded size.
// ...Length() + 20 because if we substitute the uploaded,
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/BuffStorage.h Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/BuffStorage.h Thu Aug 19 10:58:56 2010 +0300
@@ -154,7 +154,7 @@
// For stalling condition handling
TInt iLastWriteErrorCode;
- CActiveSchedulerWait iWait;
+ CActiveSchedulerWait* iWait;
// References to CHttpStorage data
RFile*& iFile;
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -79,6 +79,7 @@
{
LOGGER_ENTERFN( "ConstructL" );
CActiveScheduler::Add( this );
+ iWait = new (ELeave) CActiveSchedulerWait;
}
// -----------------------------------------------------------------------------
@@ -108,6 +109,11 @@
ResetBuffers();
delete iWritePtr; iWritePtr = 0;
+ if(iWait)
+ {
+ delete iWait;
+ iWait = NULL;
+ }
}
@@ -134,10 +140,10 @@
CLOG_WRITE_2( "(%08X) CBuffStorage::RunL DH-iStat: %d, ", this, iStatus.Int() );
}
- if(iWait.IsStarted())
+ if(iWait && iWait->IsStarted())
{
CLOG_WRITE_1 ( "(%08X) CBuffStorage::RunL() Stopping iWait", this );
- iWait.AsyncStop();
+ iWait->AsyncStop();
}
}
@@ -157,10 +163,10 @@
{
CLOG_WRITE_1("(%08X) CBuffStorage::ResetBuffers >>", this);
- if(IsActive())
+ if(IsActive()&& iWait && !iWait->IsStarted())
{
// Make sure async writes are finished
- iWait.Start();
+ iWait->Start();
}
// Cleanup
@@ -225,10 +231,10 @@
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL >>", this);
// Make sure async writes are finished before doing anything
- if(IsActive())
+ if(IsActive() && iWait && !iWait->IsStarted())
{
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling >>", this);
- iWait.Start();
+ iWait->Start();
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling <<", this);
}
@@ -335,10 +341,10 @@
// Check if previous async write is still ongoing
// Done here so if somebody switched on progressive download midway through we don't mix buffers
- if(IsActive())
+ if(IsActive()&& iWait && !iWait->IsStarted())
{
CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling >>", this);
- iWait.Start();
+ iWait->Start();
CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling <<", this);
}
@@ -415,10 +421,10 @@
{
CLOG_WRITE_2("(%08X) CBuffStorage::DoNonbufferingWriteL: %d bytes", this, aBuf.Length());
- if(IsActive())
+ if(IsActive() && iWait && !iWait->IsStarted())
{
CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling >>", this);
- iWait.Start();
+ iWait->Start();
CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling <<", this);
}
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpStorage.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpStorage.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -70,6 +70,58 @@
// FORWARD DECLARATIONS
//class ?FORWARD_CLASSNAME;
+//Music Store Warning Level Feature Flag
+#ifdef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
+
+#include <uiklafinternalcrkeys.h>
+#include <centralrepository.h>
+
+//Beside the OOD threshold value, we need to reserve extra disk space
+//for harvest server do the harvest, set this as 1M
+const TInt KFreeSpaceExtraReserved(1024*1024);
+
+static TBool CheckFreeSpaceWarningThreshold( RFs& aFs, TInt aBytesToWrite, TInt aDrive )
+ {
+ TBool isSpace = EFalse;
+ CRepository* repository = NULL;
+ TInt64 thresholdValue( 0 );
+ TVolumeInfo volumeInfo;
+ TInt err = aFs.Volume( volumeInfo, aDrive );
+ if ( err == KErrNone ) // get warning threshold
+ {
+ TRAP( err, repository = CRepository::NewL( KCRUidUiklaf ) );
+ }
+ if ( err == KErrNone )
+ {
+ if ( volumeInfo.iDrive.iDriveAtt & KDriveAttRemovable ) // for E and F
+ {
+ TInt warningValue( 0 );
+ err = repository->Get( KUikOODDiskFreeSpaceWarningNoteLevelMassMemory, warningValue );
+ if ( err == KErrNone )
+ {
+ thresholdValue = warningValue + KFreeSpaceExtraReserved;
+ }
+ }
+ else
+ {
+ TInt warningUsagePercent( 0 );
+ err = repository->Get( KUikOODDiskFreeSpaceWarningNoteLevel, warningUsagePercent );
+ if ( err == KErrNone )
+ {
+ thresholdValue = ( ( volumeInfo.iSize * ( 100 - warningUsagePercent ) ) / 100 )
+ + KFreeSpaceExtraReserved;
+ }
+ }
+ delete repository;
+ }
+ if ( err == KErrNone ) // Check warning threshold
+ {
+ isSpace = volumeInfo.iFree > thresholdValue + aBytesToWrite;
+ }
+ return isSpace;
+ }
+#endif
+
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -792,6 +844,7 @@
if (bytesToWrite < 0)
bytesToWrite = 0;
+ // Let client handle warning level check, client may want to write until critical level
TRAP( err, isSpace = !SysUtil::DiskSpaceBelowCriticalLevelL(
&iDownload->ClientApp()->Engine()->Fs(),
bytesToWrite,
@@ -805,29 +858,54 @@
#else
TPtrC drives( iDownload->ClientApp()->Engine()->iDriveLettersCenRep );
#endif
-
- // drive letters are separated by semicolons
- for( TInt i = 0; i < drives.Length() && (err || !isSpace); i = i + 2 )
+//Music Store Warning Level Feature Flag
+#ifdef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
+ // Check warning or critical level and change drive if warning or critical level would get crossed
+ // On first round, check warning level only
+ // On second round (all drives are about to cross warning level), check critical level
+ // When crossing warning level, user will see warning note regarding low disk space
+ for( TInt j = 0; j < 2 && (err || !isSpace); ++j )
{
- if( (err = fs.CharToDrive( drives[i], drive )) == KErrNone )
+#endif
+ // drive letters are separated by semicolons
+ for( TInt i = 0; i < drives.Length() && (err || !isSpace); i = i + 2 )
{
- currentDownloadsLen = DMSrvEngine->AllDownloadsSizeInDriveL(iDownload, drive);
+ if( (err = fs.CharToDrive( drives[i], drive )) == KErrNone )
+ {
+ currentDownloadsLen = DMSrvEngine->AllDownloadsSizeInDriveL(iDownload, drive);
+ // Check if there's enough memory in the phone
+ bytesToWrite = iLength + currentDownloadsLen;
+ if (bytesToWrite < 0)
+ bytesToWrite = 0;
+//Music Store Warning Level Feature Flag
+#ifdef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
- // Check if there's enough memory in the phone
- bytesToWrite = iLength + currentDownloadsLen;
- if (bytesToWrite < 0)
- bytesToWrite = 0;
-
- TRAP( err, isSpace = !SysUtil::DiskSpaceBelowCriticalLevelL(
- &fs,
- bytesToWrite,
- drive ));
+ if ( !j ) // check warning level on first round
+ {
+ isSpace = CheckFreeSpaceWarningThreshold( fs, bytesToWrite, drive );
+ }
+ else // check critical level when all drives are about to cross warning level
+ {
+ TRAP( err, isSpace = !SysUtil::DiskSpaceBelowCriticalLevelL(
+ &fs, bytesToWrite, drive ));
+ }
+ CLOG_WRITE8_4( "Free space check type %d drive %d isSpace %d, bytesToWrite %d",
+ j,drive,isSpace,bytesToWrite);
+#else if
+ TRAP( err, isSpace = !SysUtil::DiskSpaceBelowCriticalLevelL(
+ &fs, bytesToWrite, drive ));
+
+#endif
+ }
+ else
+ {
+ CLOG_WRITE8_1( "Bad drive letter [%c]", drives[i] );
+ }
}
- else
- {
- CLOG_WRITE8_1( "Bad drive letter [%c]", drives[i] );
- }
+//Music Store Warning Level Feature Flag
+#ifdef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
}
+#endif
#ifdef RD_MULTIPLE_DRIVE
CleanupStack::PopAndDestroy( drivesDynList );
#endif
--- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiDownloadsList.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -1867,8 +1867,12 @@
TFindFile file(fs);
TPtrC ptr(KNullDesC);
TInt found = file.FindByPath(fileNamePtr1,&ptr); //when second parameter to the API is Null then the it searches for the file in the Dir specified in the first parameter
+ TBool isFileOpen(EFalse);
+ TInt fileopenstatus = fs.IsFileOpen(fileNamePtr1,isFileOpen);
CleanupStack::PopAndDestroy(&fs);
CleanupStack::PopAndDestroy(fileName1);
+ if(fileopenstatus ==KErrNone && isFileOpen)
+ User::Leave(KErrInUse);
// Delete in DMgr
TBool deleted = iUiUtils->DeleteWithUserConfirmL( currDownload );
if ( deleted )
--- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadsListDlg.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -659,12 +659,31 @@
case MEikListBoxObserver::EEventItemSingleClicked:
#endif
{
+ TDownloadUiData& dlData = iDownloadsListArray->DlUiData( CurrentItemIndex() );
+ TInt32 state( dlData.iProgressState );
+ if(state == EHttpProgContentFileMoved)
+ {
+ if (!ButtonGroupContainer()->IsCommandVisible(EAknSoftkeyOpen))
+ {
+ ButtonGroupContainer()->MakeCommandVisible(EAknSoftkeyOpen,ETrue);
+ }
+ }
// If EAknSoftkeyOpen is visible, then we can activate the selected download
if (ButtonGroupContainer()->IsCommandVisible(EAknSoftkeyOpen))
{
ProcessCommandL(EAknSoftkeyOpen);
}
}
+#ifdef BRDO_SINGLE_CLICK_ENABLED_FF
+ case MEikListBoxObserver::EEventPenDownOnItem:
+ {
+ if ( iPointerEvent.iType == TPointerEvent::EButton1Down)
+ {
+ iStylusMenu->HandlePointerEventL(iPointerEvent, this);
+ }
+ break;
+ }
+#endif
default:
{
break;
@@ -728,10 +747,10 @@
if ( aPointerEvent.iType == TPointerEvent::EButton1Down)
{
iPointerEvent = aPointerEvent;
- iStylusMenu->HandlePointerEventL(aPointerEvent, this);
}
else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
{
+ iPointerEvent = aPointerEvent;
iStylusMenu->cancelLongTapL();
if(iStylusMenu->islongtapRunning())
{
--- a/browserutilities/downloadmgr/downloadmgruilib/Src/CDownloadsStylusPopupMenu.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/browserutilities/downloadmgr/downloadmgruilib/Src/CDownloadsStylusPopupMenu.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -104,7 +104,7 @@
iStylusPopupMenu->SetItemDimmed(EDownloadsListCmdFileManager,ETrue);
}
- if(typeAudio != 1) //Not an audio type
+ if(typeAudio != 1 || (typeAudio == 1 && dlData.iNumMediaObjects > 1)) //Not an audio type or multiple audio type objects.
{
isAiwcall = ETrue;
iStylusPopupMenu->SetItemDimmed(EAiwCmdContact,ETrue);
Binary file browserutilities/webutils/conf/webutils.confml has changed
--- a/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Thu Jul 15 19:53:20 2010 +0300
+++ b/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh Thu Aug 19 10:58:56 2010 +0300
@@ -163,12 +163,18 @@
// Flag for Multi touch enable
#define BRDO_MULTITOUCH_ENABLED_FF
+
+// Flag for Sapi prompt notification
+#define BRDO_SAPINTFN_ENABLED_FF
+
//To provide WidgetSIDChecker support
#define APP_SID_CHECK_SUPPORT_FF
//AT&T DownloadMgr path support flag
#define DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+//Music Store Warning Level Feature Flag
+#define DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
// One Click Connectivity support flag
#define BRDO_OCC_ENABLED_FF
@@ -204,6 +210,9 @@
//AT&T DownloadMgr path support flag
#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+//Music Store Warning Level Feature Flag
+#undef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
+
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
@@ -219,6 +228,9 @@
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
+// Flag for Sapi prompt notification
+#undef BRDO_SAPINTFN_ENABLED_FF
+
//Flag for performance improvements in TB9.2
#undef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
@@ -300,6 +312,9 @@
//AT&T DownloadMgr path support flag
#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+//Music Store Warning Level Feature Flag
+#undef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
+
//Single click support
#undef BRDO_SINGLE_CLICK_ENABLED_FF
@@ -309,6 +324,9 @@
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
+// Flag for Sapi prompt notification
+#undef BRDO_SAPINTFN_ENABLED_FF
+
//Flag for performance improvements in TB9.2
#undef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
@@ -383,7 +401,10 @@
#undef BRDO_VIDEOPLAYER2_ENABLED_FF
//AT&T DownloadMgr path support flag
-#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
+//Music Store Warning Level Feature Flag
+#undef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
//OCC support
#undef BRDO_OCC_ENABLED_FF
@@ -398,6 +419,9 @@
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
+// Flag for Sapi prompt notification
+#undef BRDO_SAPINTFN_ENABLED_FF
+
//Flag for performance improvements in TB9.2
#undef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
@@ -444,7 +468,10 @@
#undef BRDO_VIDEOPLAYER2_ENABLED_FF
//AT&T DownloadMgr path support flag
-#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+#undef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+
+//Music Store Warning Level Feature Flag
+#undef DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
//OCC support
#undef BRDO_OCC_ENABLED_FF
@@ -457,6 +484,9 @@
// Flag for Multi touch enable
#undef BRDO_MULTITOUCH_ENABLED_FF
+// Flag for Sapi prompt notification
+#undef BRDO_SAPINTFN_ENABLED_FF
+
//Flag for performance improvements in TB9.2
#undef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
@@ -504,6 +534,9 @@
//AT&T DownloadMgr path support flag
#define DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
+//Music Store Warning Level Feature Flag
+#define DOWNLOADMGR_WARNINGLEVEL_ENABLED_FF
+
//Single click support
#define BRDO_SINGLE_CLICK_ENABLED_FF
--- a/web_plat/download_path_plugin_api/inc/DownloadPathHandler.inl Thu Jul 15 19:53:20 2010 +0300
+++ b/web_plat/download_path_plugin_api/inc/DownloadPathHandler.inl Thu Aug 19 10:58:56 2010 +0300
@@ -2,7 +2,7 @@
File : DownloadPathHandler.inl
Part of : web_plat / download_path_plugin_api
Description : Music path plugin interface inline implementation file
- Version : %version: 2 % << Don't touch! Updated by Synergy at check-out.
+ Version : %version: 3 % << Don't touch! Updated by Synergy at check-out.
Copyright (c) 2010 Nokia Corporation.
This material, including documentation and any related
--- a/web_pub/browser_control_api/inc/BrCtlDefs.h Thu Jul 15 19:53:20 2010 +0300
+++ b/web_pub/browser_control_api/inc/BrCtlDefs.h Thu Aug 19 10:58:56 2010 +0300
@@ -218,7 +218,12 @@
*/
ECommandPauseScriptTimers,
ECommandResumeScriptTimers,
- ECommandCancelQueuedTransactions
+ ECommandCancelQueuedTransactions,
+ ECommandOOMExit,
+ /**
+ * Notify Flash Plugin FocusChangeEvent
+ */
+ ECommandNotifyPluginFocusChangeEvent
};
/**
* The load event that occurred.
--- a/web_pub/browser_control_api/inc/BrCtlInterface.h Thu Jul 15 19:53:20 2010 +0300
+++ b/web_pub/browser_control_api/inc/BrCtlInterface.h Thu Aug 19 10:58:56 2010 +0300
@@ -611,6 +611,8 @@
* @return void.
*/
IMPORT_C virtual void TakeSnapshotL(CFbsBitmap& snapshot) = 0;
+
+ IMPORT_C virtual TBool IsSynchRequestPending()= 0 ;
};
--- a/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Thu Jul 15 19:53:20 2010 +0300
+++ b/web_pub/browser_plugin_api/inc/PluginAdapterInterface.h Thu Aug 19 10:58:56 2010 +0300
@@ -126,7 +126,8 @@
EMenuOptionEnableDecider,
EPluginPause,
ECollectBitmap,
- ECollectBitmapSupported
+ ECollectBitmapSupported,
+ EAccesPointChanged
};
--- a/webengine/device/inc/DeviceLiwBinding.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/device/inc/DeviceLiwBinding.h Thu Aug 19 10:58:56 2010 +0300
@@ -24,6 +24,7 @@
#include "DeviceLiwMap.h"
#include "DeviceBinding.h"
#include "DeviceLiwIterable.h"
+#include "browser_platform_variant.hrh"
class CLiwServiceHandler;
class CRTSecMgrScriptSession;
@@ -173,6 +174,12 @@
**/
void SetAppName();
#endif
+ /**
+ * Calling attachL if sapi prompt is needed
+ * @return TInt
+ * @since
+ **/
+ TInt sapiPromptNeededL(RCriteriaArray aCrit_arr);
private:
CLiwServiceHandler* m_serviceHandler; // Owned
--- a/webengine/device/src/DeviceLiwBinding.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/device/src/DeviceLiwBinding.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -42,6 +42,8 @@
#include "DeviceLiwIterable.h"
#include "DeviceLiwResult.h"
+
+
using namespace KJS;
using namespace LIW;
@@ -125,7 +127,7 @@
}
#ifdef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF
m_scriptSession->SetPromptOption(RTPROMPTUI_PROVIDER); // This is for setting the new prompting method
-#endif
+#endif
CleanupStack::PopAndDestroy( trust );
}
@@ -164,6 +166,7 @@
if ( argcount > 0 && args[0]->type() == StringType &&
args[0]->toString( exec ).size() > 0 )
{
+
TRAP( error,
{
// Get service name
@@ -211,7 +214,7 @@
switch ( widgetregistry.WidgetSapiAccessState(m_Uid))
{
case SAPISECURITYPROMPTNEEDED :
- load_err = m_serviceHandler->AttachL( crit_arr, *m_scriptSession );
+ load_err = sapiPromptNeededL(crit_arr);
break;
case SAPIPROMPTLESS :
load_err = m_serviceHandler->AttachL( crit_arr );
@@ -254,7 +257,21 @@
return error;
}
-
+
+// ---------------------------------------------------------------------------
+// attachL called if sapi prompt is needed
+// return TInt - load error
+// ---------------------------------------------------------------------------
+//
+TInt CDeviceLiwBinding::sapiPromptNeededL(RCriteriaArray aCrit_arr)
+ {
+#ifdef BRDO_SAPINTFN_ENABLED_FF
+ return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession, m_Uid.iUid );
+#else
+ return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession );
+#endif
+ }
+
// ---------------------------------------------------------------------------
// Convert Unload service provider
// return JSValue - javascript list
--- a/webengine/device/src/DeviceLiwPeer.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/device/src/DeviceLiwPeer.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -58,12 +58,12 @@
DeviceLiwPeer::~DeviceLiwPeer()
{
delete m_serviceName;
+ m_interface->Close();
+ m_interface = NULL; // in majority cases, the interface close methods delete them selves.
m_callbackArray->ResetAndDestroy();
m_callbackArray->Close();
delete m_callbackArray;
- m_callbackArray = NULL;
- m_interface->Close();
- m_interface = NULL; // in majority cases, the interface close methods delete them selves.
+ m_callbackArray = NULL;
}
--- a/webengine/osswebengine/JavaScriptCore/API/JSClassRef.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/JavaScriptCore/API/JSClassRef.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -122,7 +122,10 @@
// remove functions from the original class
JSClassDefinition objectDefinition = *definition;
objectDefinition.staticFunctions = 0;
- return new OpaqueJSClass(&objectDefinition, protoClass);
+ JSClassRef jsClass = new OpaqueJSClass(&objectDefinition, protoClass);
+ if(protoClass && !jsClass)
+ delete protoClass;
+ return jsClass;
}
return new OpaqueJSClass(definition, 0);
--- a/webengine/osswebengine/JavaScriptCore/bindings/runtime_method.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/JavaScriptCore/bindings/runtime_method.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -75,7 +75,7 @@
// If thisObj is the DOM object for a plugin, get the corresponding
// runtime object from the DOM object.
JSValue* value = thisObj->get(exec, "__apple_runtime_object");
- if (value->isObject(&KJS::RuntimeObjectImp::info))
+ if (value && value->isObject(&KJS::RuntimeObjectImp::info))
imp = static_cast<RuntimeObjectImp*>(value);
}
--- a/webengine/osswebengine/JavaScriptCore/kjs/collector.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/JavaScriptCore/kjs/collector.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -113,6 +113,7 @@
size_t Collector::mainThreadOnlyObjectCount = 0;
bool Collector::memoryFull = false;
+bool Collector::m_exitInProgress = false;
#if PLATFORM(SYMBIAN)
unsigned int Collector::CallStackGrowthThresh = 0;
@@ -834,6 +835,11 @@
EXPORT
bool Collector::collect()
{
+ if(m_exitInProgress)
+ {
+ return false;
+ }
+
ASSERT(JSLock::lockCount() > 0);
ASSERT(JSLock::currentThreadIsHoldingLock());
@@ -997,6 +1003,17 @@
return deleted;
}
+EXPORT
+void Collector::startedExit(bool status)
+ {
+ m_exitInProgress = status;
+ }
+EXPORT
+bool Collector::isExitInProgress()
+ {
+ return m_exitInProgress;
+ }
+
size_t Collector::size()
{
return heap.numLiveObjects;
--- a/webengine/osswebengine/JavaScriptCore/kjs/collector.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/JavaScriptCore/kjs/collector.h Thu Aug 19 10:58:56 2010 +0300
@@ -44,6 +44,8 @@
public:
static void* allocate(size_t s);
IMPORT static bool collect();
+ IMPORT static void startedExit(bool status);
+ IMPORT static bool isExitInProgress();
static bool isBusy(); // true if an allocation or collection is in progress
static const size_t minExtraCostSize = 256;
@@ -98,6 +100,7 @@
static size_t mainThreadOnlyObjectCount;
static bool memoryFull;
+ static bool m_exitInProgress;
};
// tunable parameters
--- a/webengine/osswebengine/MemoryManager/Inc/oom.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/MemoryManager/Inc/oom.h Thu Aug 19 10:58:56 2010 +0300
@@ -57,7 +57,7 @@
// OOM_POST_CHECK_FAILED { return_with_oom; }
// .... your normal return.
#define OOM_PRE_CHECK(s, m, c) { _LIT8(__temp, c); if( MemoryManager::PreCheck( s, m, __temp ) ) {
-#define OOM_POST_CHECK_FAILED(__r) } } if( MemoryManager::PostCheck() != ENoOOM ) { __r;}
+#define OOM_POST_CHECK_FAILED(__r) } else { __r;} }
#else // __OOM__
--- a/webengine/osswebengine/MemoryManager/Src/MemoryPool.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/MemoryManager/Src/MemoryPool.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -82,6 +82,10 @@
TInt idx = iStoppers.Find( aStopper );
if( idx != KErrNotFound )
iStoppers.Remove( idx );
+
+ if(iStoppers.Count() == 0 && iStopScheduler->IsActive()) // cancel stop if nobody is interested
+ iStopScheduler->Cancel();
+
}
//-----------------------------------------------------------------------------
@@ -490,7 +494,7 @@
TAny *p = iAlloc->Alloc( aSize );
if(iAlloc->isLowSystemMemory && p) // use this a pre OOM indicator
{
- iStopScheduler->Start( CStopScheduler::ECheckMemory, 0 );
+ if(iStopScheduler) iStopScheduler->Start( CStopScheduler::ECheckMemory, 0 );
iAlloc->isLowSystemMemory = 0; // reset so that we don't check before next request for RAM
}
@@ -512,7 +516,7 @@
TAny* p = iAlloc->ReAlloc( aPtr, aSize );
if(iAlloc->isLowSystemMemory && p) // use this a pre OOM indicator
{
- iStopScheduler->Start( CStopScheduler::ECheckMemory, 0 );
+ if(iStopScheduler) iStopScheduler->Start( CStopScheduler::ECheckMemory, 0 );
iAlloc->isLowSystemMemory = 0; // reset so that we don't check before next request for RAM
}
--- a/webengine/osswebengine/WebCore/bindings/js/GCController.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/GCController.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -41,19 +41,38 @@
GCController::GCController()
: m_GCTimer(this, &GCController::gcTimerFired)
+ , m_exitInProgress(false)
{
}
void GCController::garbageCollectSoon()
{
- if (!m_GCTimer.isActive())
- m_GCTimer.startOneShot(0);
+ if(!m_exitInProgress)
+ {
+ if (!m_GCTimer.isActive())
+ m_GCTimer.startOneShot(0);
+ }
}
void GCController::gcTimerFired(Timer<GCController>*)
{
- JSLock lock;
- Collector::collect();
+ if(!m_exitInProgress)
+ {
+ JSLock lock;
+ Collector::collect();
+ }
}
-
+
+void GCController::startedExit(TBool aExitStatus)
+ {
+ m_exitInProgress = aExitStatus;
+ if(m_exitInProgress)
+ {
+ KJS::Collector::startedExit(true);
+ if(m_GCTimer.isActive())
+ {
+ m_GCTimer.stop();
+ }
+ }
+ }
} // namespace WebCore
--- a/webengine/osswebengine/WebCore/bindings/js/GCController.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/GCController.h Thu Aug 19 10:58:56 2010 +0300
@@ -36,12 +36,14 @@
public:
void garbageCollectSoon();
-
+ void startedExit(TBool aExitStatus);
+ TBool isExitInProgress() {return m_exitInProgress;}
private:
GCController(); // Use gcController() instead
void gcTimerFired(Timer<GCController>*);
Timer<GCController> m_GCTimer;
+ TBool m_exitInProgress;
};
// Function to obtain the global GC controller.
--- a/webengine/osswebengine/WebCore/bindings/js/JSHTMLDocumentCustom.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/JSHTMLDocumentCustom.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -112,11 +112,11 @@
// When assigning location, IE and Mozilla both resolve the URL
// relative not the target frame.
Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
- if (activeFrame)
+ if (activeFrame) {
str = activeFrame->document()->completeURL(str);
-
- bool userGesture = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->wasRunByUserGesture();
- frame->loader()->scheduleLocationChange(str, activeFrame->loader()->outgoingReferrer(), false, userGesture);
+ bool userGesture = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->wasRunByUserGesture();
+ frame->loader()->scheduleLocationChange(str, activeFrame->loader()->outgoingReferrer(), false, userGesture);
+ }
}
// Custom functions
--- a/webengine/osswebengine/WebCore/bindings/js/kjs_window.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/kjs_window.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -287,6 +287,11 @@
static bool shutdownInProgress = false;
static CPeriodic* sharedTimer;
+void shutdownJSTimer()
+ {
+ JTimerBase::shutdownSharedTimer();
+ }
+
void setDeferringJSTimers(bool defer)
{
JTimerBase::setDeferringTimers(defer);
--- a/webengine/osswebengine/WebCore/bindings/js/kjs_window.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/kjs_window.h Thu Aug 19 10:58:56 2010 +0300
@@ -226,6 +226,7 @@
};
void setDeferringJSTimers(bool defer); // allow JS timers to defer when shared timers do
+ void shutdownJSTimer(); // shut down JS timers
} // namespace
namespace WebCore {
--- a/webengine/osswebengine/WebCore/dom/ContainerNode.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/dom/ContainerNode.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -671,11 +671,10 @@
bool ContainerNode::getUpperLeftCorner(int &xPos, int &yPos) const
{
- if (!renderer())
- return false;
RenderObject *o = renderer();
+ if (!o) return false;
+
RenderObject *p = o;
-
xPos = yPos = 0;
if (!o->isInline() || o->isReplaced()) {
o->absolutePosition(xPos, yPos);
@@ -732,10 +731,9 @@
bool ContainerNode::getLowerRightCorner(int &xPos, int &yPos) const
{
- if (!renderer())
- return false;
+ RenderObject *o = renderer();
+ if (!o) return false;
- RenderObject *o = renderer();
xPos = yPos = 0;
if (!o->isInline() || o->isReplaced())
{
--- a/webengine/osswebengine/WebCore/html/HTMLInputElement.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLInputElement.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -492,40 +492,40 @@
return static_cast<RenderTextControl*>(renderer())->selectionEnd();
}
+static bool isTextFieldWithRenderer(HTMLInputElement* element)
+{
+ if (!element->isTextField())
+ return false;
+
+ element->document()->updateLayoutIgnorePendingStylesheets();
+ if (!element->renderer())
+ return false;
+
+ return true;
+}
+
void HTMLInputElement::setSelectionStart(int start)
{
- if (!isTextField())
- return;
- if (!renderer())
- return;
- static_cast<RenderTextControl*>(renderer())->setSelectionStart(start);
+ if (isTextFieldWithRenderer(this))
+ static_cast<RenderTextControl*>(renderer())->setSelectionStart(start);
}
void HTMLInputElement::setSelectionEnd(int end)
{
- if (!isTextField())
- return;
- if (!renderer())
- return;
- static_cast<RenderTextControl*>(renderer())->setSelectionEnd(end);
+ if (isTextFieldWithRenderer(this))
+ static_cast<RenderTextControl*>(renderer())->setSelectionEnd(end);
}
void HTMLInputElement::select()
{
- if (!isTextField())
- return;
- if (!renderer())
- return;
- static_cast<RenderTextControl*>(renderer())->select();
+ if (isTextFieldWithRenderer(this))
+ static_cast<RenderTextControl*>(renderer())->select();
}
void HTMLInputElement::setSelectionRange(int start, int end)
{
- if (!isTextField())
- return;
- if (!renderer())
- return;
- static_cast<RenderTextControl*>(renderer())->setSelectionRange(start, end);
+ if (isTextFieldWithRenderer(this))
+ static_cast<RenderTextControl*>(renderer())->setSelectionRange(start, end);
}
void HTMLInputElement::accessKeyAction(bool sendToAnyElement)
--- a/webengine/osswebengine/WebCore/html/HTMLParser.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLParser.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -380,7 +380,7 @@
}
} else if (h->hasLocalName(htmlTag)) {
if (!current->isDocumentNode() ) {
- if (document->documentElement()->hasTagName(htmlTag)) {
+ if (document->documentElement()->hasTagName(htmlTag) && !m_isParsingFragment) {
reportError(RedundantHTMLBodyError, &localName);
// we have another <HTML> element.... apply attributes to existing one
// make sure we don't overwrite already existing attributes
@@ -422,7 +422,7 @@
return false;
}
} else if (h->hasLocalName(bodyTag)) {
- if (inBody && document->body()) {
+ if (inBody && document->body() && !m_isParsingFragment) {
// we have another <BODY> element.... apply attributes to existing one
// make sure we don't overwrite already existing attributes
// some sites use <body bgcolor=rightcolor>...<body bgcolor=wrongcolor>
@@ -677,7 +677,7 @@
// we can't implement that behaviour now because it could cause too many
// regressions and the headaches are not worth the work as long as there is
// no site actually relying on that detail (Dirk)
- if (document->body())
+ if (document->body() && !m_isParsingFragment)
document->body()->setAttribute(styleAttr, "display:none");
inBody = false;
}
@@ -1162,7 +1162,8 @@
prevMaxElem->next = elem;
ASSERT(newNodePtr);
prevMaxElem->node = newNodePtr;
- prevMaxElem->didRefNode = false;
+ newNodePtr->ref();
+ prevMaxElem->didRefNode = true;
} else
delete elem;
}
@@ -1392,6 +1393,10 @@
return;
head = new HTMLHeadElement(document);
+
+ if (m_isParsingFragment)
+ return;
+
HTMLElement* body = document->body();
ExceptionCode ec = 0;
document->documentElement()->insertBefore(head, body, ec);
--- a/webengine/osswebengine/WebCore/html/HTMLSelectElement.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLSelectElement.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -668,7 +668,7 @@
evt->setDefaultHandled();
}
- if (evt->type() == mousedownEvent && evt->isMouseEvent() && static_cast<MouseEvent*>(evt)->button() == LeftButton) {
+ if (menuList && evt->type() == mousedownEvent && evt->isMouseEvent() && static_cast<MouseEvent*>(evt)->button() == LeftButton) {
focus();
if (menuList->popupIsVisible())
menuList->hidePopup();
--- a/webengine/osswebengine/WebCore/html/HTMLTextAreaElement.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLTextAreaElement.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -95,28 +95,34 @@
return 0;
}
+static RenderTextControl* rendererAfterUpdateLayout(HTMLTextAreaElement* element)
+{
+ element->document()->updateLayoutIgnorePendingStylesheets();
+ return static_cast<RenderTextControl*>(element->renderer());
+}
+
void HTMLTextAreaElement::setSelectionStart(int start)
{
- if (renderer())
- static_cast<RenderTextControl*>(renderer())->setSelectionStart(start);
+ if (RenderTextControl* renderer = rendererAfterUpdateLayout(this))
+ renderer->setSelectionStart(start);
}
void HTMLTextAreaElement::setSelectionEnd(int end)
{
- if (renderer())
- static_cast<RenderTextControl*>(renderer())->setSelectionEnd(end);
+ if (RenderTextControl* renderer = rendererAfterUpdateLayout(this))
+ renderer->setSelectionEnd(end);
}
void HTMLTextAreaElement::select()
{
- if (renderer())
- static_cast<RenderTextControl *>(renderer())->select();
+ if (RenderTextControl* renderer = rendererAfterUpdateLayout(this))
+ renderer->select();
}
void HTMLTextAreaElement::setSelectionRange(int start, int end)
{
- if (renderer())
- static_cast<RenderTextControl*>(renderer())->setSelectionRange(start, end);
+ if (RenderTextControl* renderer = rendererAfterUpdateLayout(this))
+ renderer->setSelectionRange(start, end);
}
void HTMLTextAreaElement::childrenChanged()
--- a/webengine/osswebengine/WebCore/html/HTMLTextFieldInnerElement.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLTextFieldInnerElement.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -77,10 +77,10 @@
{
// On mousedown, bring up a menu, if needed
HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode());
- if (evt->type() == mousedownEvent && evt->isMouseEvent() && static_cast<MouseEvent*>(evt)->button() == LeftButton) {
+ if (input && evt->type() == mousedownEvent && evt->isMouseEvent() && static_cast<MouseEvent*>(evt)->button() == LeftButton) {
input->focus();
input->select();
- if (input && input->renderer() && static_cast<RenderTextControl*>(input->renderer())->popupIsVisible())
+ if (input->renderer() && static_cast<RenderTextControl*>(input->renderer())->popupIsVisible())
static_cast<RenderTextControl*>(input->renderer())->hidePopup();
else if (input->maxResults() > 0)
static_cast<RenderTextControl*>(input->renderer())->showPopup();
--- a/webengine/osswebengine/WebCore/loader/CachedImage.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/loader/CachedImage.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -187,7 +187,8 @@
// Have the image update its data from its internal buffer.
// It will not do anything now, but will delay decoding until
// queried for info (like size or specific image frames).
- sizeAvailable = m_image->setData(m_data, allDataReceived);
+ if(m_image)
+ sizeAvailable = m_image->setData(m_data, allDataReceived);
// Go ahead and tell our observers to try to draw if we have either
// received all the data or the size is known. Each chunk from the
--- a/webengine/osswebengine/WebCore/loader/DocumentLoader.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/loader/DocumentLoader.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -248,7 +248,8 @@
if (!frameLoader())
return;
setMainDocumentError(error);
- if (isComplete)
+ //During LWS for invalid webpage framloader was returning Null which is causing Dataabort panic
+ if (isComplete && frameLoader())
frameLoader()->mainReceivedCompleteError(this, error);
}
@@ -418,7 +419,8 @@
void DocumentLoader::updateLoading()
{
ASSERT(this == frameLoader()->activeDocumentLoader());
- setLoading(frameLoader()->isLoading());
+ if(m_frame)
+ setLoading(frameLoader()->isLoading());
}
void DocumentLoader::setFrame(Frame* frame)
--- a/webengine/osswebengine/WebCore/loader/ResourceLoader.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/loader/ResourceLoader.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -91,9 +91,7 @@
if (m_frame) {
#if PLATFORM(SYMBIAN)
- if (control(m_frame.get())->webView()->isSynchRequestPending()) {
- // Reset synchronous request status for new frame
- control(m_frame.get())->webView()->synchRequestPending(false);
+ if (control(m_frame.get())->webView()->isSynchRequestPending()) {
if (!cancelled()) {
// Cancel pending synchronous request
cancel();
--- a/webengine/osswebengine/WebCore/loader/icon/IconDatabase.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/loader/icon/IconDatabase.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -1005,6 +1005,12 @@
void* IconDatabase::iconDatabaseSyncThreadStart(void* vIconDatabase)
{
IconDatabase* iconDB = static_cast<IconDatabase*>(vIconDatabase);
+
+#if PLATFORM(SYMBIAN)
+ // rename the thread
+ _LIT(KThreadName, "iconDbSync");
+ RThread().RenameMe(KThreadName);
+#endif
return iconDB->iconDatabaseSyncThread();
}
--- a/webengine/osswebengine/WebCore/page/EventHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/EventHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -531,14 +531,24 @@
void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const
{
- if (!m_frame || !m_frame->document()) {
- flagDHTML = false;
- flagUA = false;
- }
+ flagDHTML = false;
+ flagUA = false;
+
+ if (!m_frame)
+ return;
- unsigned mask = m_frame->page()->dragController()->delegateDragSourceAction(m_frame->view()->contentsToWindow(m_mouseDownPos));
+ Page* page = m_frame->page();
+ if(!page)
+ return;
+
+ FrameView* view = m_frame->view();
+ if(!view)
+ return;
+
+ unsigned mask = page->dragController()->delegateDragSourceAction(view->contentsToWindow(m_mouseDownPos));
flagDHTML = (mask & DragSourceActionDHTML) != DragSourceActionNone;
flagUA = ((mask & DragSourceActionImage) || (mask & DragSourceActionLink) || (mask & DragSourceActionSelection));
+
}
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent)
@@ -686,7 +696,11 @@
if (cimage->image()->isNull())
break;
if (!cimage->errorOccurred())
- return Cursor(cimage->image(), hotSpot);
+ //The implementation for Cursor(cimage->image(), hotSpot) is not present.So calling this method will create a partially constructed object
+ //where PlatformCursor pointer points to nothing.This will cause crashes when cursor.Imp()->Type will be called.
+ //So better to call nonecursor instead of Cursor(cimage->image(), hotSpot).
+ //return Cursor(cimage->image(), hotSpot).
+ return noneCursor();
}
}
--- a/webengine/osswebengine/WebCore/page/Frame.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/Frame.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -437,7 +437,7 @@
String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element* element)
{
- RegularExpression* regExp = regExpForLabels(labels);
+ OwnPtr<RegularExpression> regExp( regExpForLabels(labels) );
// We stop searching after we've seen this many chars
const unsigned int charsSearchedThreshold = 500;
// This is the absolute max we search. We allow a little more slop than
@@ -463,7 +463,7 @@
} else if (n->hasTagName(tdTag) && !startingTableCell) {
startingTableCell = static_cast<HTMLTableCellElement*>(n);
} else if (n->hasTagName(trTag) && startingTableCell) {
- String result = searchForLabelsAboveCell(regExp, startingTableCell);
+ String result = searchForLabelsAboveCell(regExp.get(), startingTableCell);
if (!result.isEmpty())
return result;
searchedCellAbove = true;
@@ -484,7 +484,7 @@
// If we started in a cell, but bailed because we found the start of the form or the
// previous element, we still might need to search the row above us for a label.
if (startingTableCell && !searchedCellAbove) {
- return searchForLabelsAboveCell(regExp, startingTableCell);
+ return searchForLabelsAboveCell(regExp.get(), startingTableCell);
}
return String();
}
@@ -496,7 +496,7 @@
name.replace(RegularExpression("[[:digit:]]"), " ");
name.replace('_', ' ');
- RegularExpression* regExp = regExpForLabels(labels);
+ OwnPtr<RegularExpression> regExp( regExpForLabels(labels) );
// Use the largest match we can find in the whole name string
int pos;
int length;
@@ -1774,6 +1774,14 @@
w->disconnectFrame();
d->m_page = 0;
+ if(d->m_lifeSupportTimer.isActive()){
+ //m_lifeSupportTimer is still active. It is not going to get triggered. So the frame needs to be dereferenced
+ deref();
+ d->m_lifeSupportTimer.stop();
+#ifndef NDEBUG
+ keepAliveSet().remove(this);
+#endif
+ }
}
void Frame::disconnectOwnerElement()
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -142,7 +142,7 @@
void WebCoreFrameBridge::addData(const char* data, int length)
{
- Document *doc = m_frame->document();
+ Document *doc = m_frame ? m_frame->document() : NULL;
// Document may be nil if the part is about to redirect
// as a result of JS executing during load, i.e. one frame
@@ -177,8 +177,8 @@
void WebCoreFrameBridge::createFrameViewWithScrollView(MWebCoreWidget* view, int marginWidth, int marginHeight)
{
// If we own the view, delete the old one - otherwise the render m_frame will take care of deleting the view.
- if (m_frame)
- m_frame->setView(NULL);
+ ASSERT(m_frame);
+ m_frame->setView(NULL);
FrameView* frameView = new FrameView(m_frame);
m_frame->setView(frameView);
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreGraphicsContext.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreGraphicsContext.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -54,6 +54,7 @@
{
iScrollView = aView;
iOffscreenBitmap = aBitmap;
+ iOpacity = 1.0f; // default 1.0f i.e. fully opaque
}
WebCoreGraphicsContext::~WebCoreGraphicsContext()
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreGraphicsContext.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreGraphicsContext.h Thu Aug 19 10:58:56 2010 +0300
@@ -128,6 +128,16 @@
iScrollView = &aView;
}
+ void setOpacity(float opacity)
+ {
+ iOpacity = opacity;
+ }
+
+ float opacity()
+ {
+ return iOpacity;
+ }
+
protected:
WebCoreGraphicsContext(CFbsBitmap* aBitmap, MScrollView* aView);
@@ -143,6 +153,7 @@
TRect iClippingRect;
TPoint iOrigin;
TBool iHasClipping;
+ float iOpacity;
};
#endif
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreWidget.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreWidget.h Thu Aug 19 10:58:56 2010 +0300
@@ -85,7 +85,7 @@
virtual TSize sizeHint() const { return TSize(); }
virtual void draw(WebCoreGraphicsContext&, const TRect&) { }
virtual void invalidateRect(const TRect&, TBool) = 0;
- virtual void scrollTo(const TPoint&) = 0;
+ virtual void scrollTo(const TPoint&, TBool aNotifyPlugins=EFalse) = 0;
virtual TRect visibleRect() const = 0;
virtual TSize contentSize() const = 0;
virtual void resizeContent(const TSize&) = 0;
--- a/webengine/osswebengine/WebCore/platform/KURL.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/KURL.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -223,6 +223,9 @@
return (c - 'A' + 10) & 0xF; // handle both upper and lower case without a branch
}
+static const unsigned maximumValidPortNumber = 0xFFFE;
+static const unsigned invalidPortNumber = 0xFFFF;
+
// KURL
KURL::KURL() : m_isValid(false)
@@ -544,14 +547,16 @@
if (!m_isValid) {
return 0;
}
+ int result;
if (hostEndPos != portEndPos) {
- bool ok;
- unsigned short result = urlString.mid(hostEndPos + 1, portEndPos - hostEndPos - 1).toUShort(&ok);
- if (!ok) {
- result = 0;
- }
- return result;
+
+ result = urlString.mid(hostEndPos + 1, portEndPos - hostEndPos - 1).toInt();
+
+ if (0 >= result || result > maximumValidPortNumber) {
+ return invalidPortNumber;
+ }
+ return (unsigned short int)result;
}
return 0;
--- a/webengine/osswebengine/WebCore/platform/graphics/symbian/GraphicsContextSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/graphics/symbian/GraphicsContextSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -203,7 +203,14 @@
static inline void setBrushColor(WebCoreGraphicsContext* aContext, const Color& col)
{
- aContext->gc().SetBrushColor(TRgb(col.red(),col.green(),col.blue()));
+ TRgb b(col.red(),col.green(),col.blue());
+
+ // set 'alpha' value according to opacity
+ float opacity = aContext->opacity();
+ TInt alphaToSet = (TInt) (opacity * 255);
+ b.SetAlpha(alphaToSet);
+
+ aContext->gc().SetBrushColor(b);
aContext->gc().SetPenStyle(CGraphicsContext::ENullPen);
aContext->gc().SetBrushStyle(CGraphicsContext::ESolidBrush);
}
@@ -518,6 +525,7 @@
const Vector<IntRect>& rects = focusRingRects();
RectPolygon* rectContour = new RectPolygon();
+ if(!rectContour) return;
// prepare the contour of polygons
for( int i=0; i<rects.size(); ++i ) {
@@ -526,8 +534,10 @@
}
WebCoreGraphicsContext* context = m_data->iContext;
- if (!context)
+ if (!context) {
+ delete rectContour;
return;
+ }
CFbsBitGc& gc = context->gc();
@@ -814,4 +824,24 @@
notImplemented();
}
+void GraphicsContext::beginTransparencyLayer(float opacity)
+{
+ if (paintingDisabled())
+ return;
+
+ // set opacity value
+ m_data->iContext->setOpacity(opacity);
+
}
+
+void GraphicsContext::endTransparencyLayer()
+{
+ if (paintingDisabled())
+ return;
+
+ // Re-set opacity to default "1.0f" i.e. fully opaque
+ m_data->iContext->setOpacity(1.0f);
+}
+
+
+}
--- a/webengine/osswebengine/WebCore/platform/graphics/symbian/ImageSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/graphics/symbian/ImageSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -447,7 +447,7 @@
WebCoreGraphicsContext* context = ctxt->platformContext();
CMaskedBitmap* bm = frameAtIndex(m_currentFrame);
- if(!bm || bm->IsFullyTransparent())
+ if(!bm ||!bm->IsCompletlyInitialised()|| bm->IsFullyTransparent())
return;
IntSize intrinsicImageSize = size();
@@ -489,21 +489,24 @@
TWebCoreSavedContext savedContext = context->save();
context->setClippingRect(bmpRect);
- bm->TileInBitmapRect(context->gc(), bmpRect, point);
- context->restore(savedContext);
-
- /*bmpRect.Move( orig );
- if( bmpRect.Intersects( TRect( TPoint(0,0), sz ) ) ) {
+ if ( (bm->HasMask()) && (bm->SizeInPixels() == TSize(1,1)) &&
+ ((bm->Bitmap().DisplayMode() == EColor64K) || (bm->Bitmap().DisplayMode() == EColor16MU)))
+ {
+ bmpRect.Move( orig );
+ bmpRect.Intersection( TRect( TPoint(0,0), sz ) );
// offscreen bitmap space to aRect space
TPoint so( bmpRect.iTl );
so -= (trgRect.iTl + orig);
so += off;
-
// tiling the image
- //bm->TileInBitmapRect( dstBmp, bmpRect, so );
+ bm->TileInBitmapRect( dstBmp, bmpRect, so );
+ }
+ else
+ {
bm->TileInBitmapRect(context->gc(), bmpRect, point);
- }*/
- }
+ }
+ context->restore(savedContext);
+ }
}
void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const AffineTransform& patternTransform,
--- a/webengine/osswebengine/WebCore/platform/network/ResourceHandle.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/ResourceHandle.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -34,6 +34,8 @@
namespace WebCore {
+static const unsigned invalidPortNumber = 0xFFFF;
+
ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading,
bool shouldContentSniff, bool mightDownloadFromHandle)
: d(new ResourceHandleInternal(this, request, client, defersLoading, shouldContentSniff, mightDownloadFromHandle))
@@ -72,7 +74,8 @@
ResourceHandleClient* ResourceHandle::client() const
{
if(d && d->m_client)
- return d->m_client;
+ return d->m_client;
+ return 0;
}
void ResourceHandle::setClient(ResourceHandleClient* client)
@@ -164,17 +167,33 @@
2049, // NFS
4045, // lockd
6000, // X11
+ 6665, // Alternate IRC [Apple addition]
+ 6666, // Alternate IRC [Apple addition]
+ 6667, // Standard IRC [Apple addition]
+ 6668, // Alternate IRC [Apple addition]
+ 6669, // Alternate IRC [Apple addition]
+ invalidPortNumber, // Used to block all invalid port numbers
};
const unsigned short* const blockedPortListEnd = blockedPortList
+ sizeof(blockedPortList) / sizeof(blockedPortList[0]);
-// fixme use the template
#if PLATFORM(SYMBIAN)
- return true;
+ bool found = false;
+
+ for (int i = 0; i < sizeof(blockedPortList) / sizeof(blockedPortList[0]); ++i) {
+ if (blockedPortList[i] == port) {
+ found = true;
+ break;
+ }
+ }
+ // If the port is not in the blocked port list, allow it.
+ if(!found) return true;
+
#else
// If the port is not in the blocked port list, allow it.
if (!std::binary_search(blockedPortList, blockedPortListEnd, port))
return true;
+#endif
// Allow ports 21 and 22 for FTP URLs, as Mozilla does.
if ((port == 21 || port == 22) && request.url().url().startsWith("ftp:", false))
@@ -185,7 +204,6 @@
return true;
return false;
-#endif
}
} // namespace WebCore
--- a/webengine/osswebengine/WebCore/platform/network/symbian/CookieHandler.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/CookieHandler.h Thu Aug 19 10:58:56 2010 +0300
@@ -89,7 +89,7 @@
*/
virtual ~CookieHandler();
void destroy();
-
+ inline RCookieManager* cookieManager(){return m_cookieManager;}
private : // constructors
/**
* Constructor.
--- a/webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -159,7 +159,8 @@
}
}
}
- m_maxSize = body->Length();
+ if(body != NULL)
+ m_maxSize = body->Length();
}
void DataConnection::cancel()
@@ -202,12 +203,17 @@
HBufC8* encoding = NULL;
HBufC8* body = NULL;
parseUrlLC(contentType, encoding, body);
-
- ResourceResponse response(m_handle->request().url().des(), contentType->Des(), body->Length(), encoding->Des(), String() );
- CResourceHandleManager::self()->receivedResponse(m_handle, response, this);
- CResourceHandleManager::self()->receivedData(m_handle, body->Des(), body->Length(), this);
+ if(body != NULL)
+ {
+ ResourceResponse response(m_handle->request().url().des(), contentType->Des(), body->Length(), encoding->Des(), String() );
+ CResourceHandleManager::self()->receivedResponse(m_handle, response, this);
+ CResourceHandleManager::self()->receivedData(m_handle, body->Des(), body->Length(), this);
+ }
CResourceHandleManager::self()->receivedFinished(m_handle, KErrNone, this);
- CleanupStack::PopAndDestroy(3); // contentType, encoding, body
+ if(body != NULL)
+ CleanupStack::PopAndDestroy(3); // contentType, encoding, body
+ else
+ CleanupStack::PopAndDestroy(2); // contentType, encoding
derefHandle();
}
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -180,6 +180,8 @@
delete m_unknownContentHandler;
delete m_cacheSupply;
delete m_postDataSupplier;
+ if(m_transaction)
+ m_transaction->Close();
delete m_transaction;
}
@@ -715,7 +717,6 @@
uriParser.UriWithoutFragment( uriNoFrag );
TUriParser8 parserNoFrag;
parserNoFrag.Parse( uriNoFrag );
- m_transaction->Request().SetURIL( parserNoFrag );
// now save the fragment for later use
const TDesC8& fragment = uriParser.Extract( EUriFragment );
delete m_frag;
@@ -726,6 +727,7 @@
{
m_frag = fragment.AllocL();
}
+ m_transaction->Request().SetURIL( parserNoFrag );
}
HandleSpecialEvent(aEvent.iStatus);
break;
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -38,14 +38,17 @@
#include "StaticObjectsContainer.h"
#include "WebFrame.h"
#include "ResourceHandleClient.h"
-
+#include <FeatMgr.h>
// CONSTANTS
_LIT8( KHttpProtString, "HTTP/TCP" );
_LIT (KNullStr, "");
const TInt KResetRetryFlagTimeOut = 5*1000*1000;
TInt doResetFlag(TAny*);
class MBrCtlSpecialLoadObserver;
-
+//FIXME: Below constant need to be properly set or removed after wk30 platform, since it will be defined by platform
+#define KFeatureIdBrowserGracefulSocketShutdown 361
+//Below is socket lingering timeout
+#define SOCKET_LINGERING_TIMEOUT 100000
using namespace WebCore;
HttpSessionManager::HttpSessionManager()
@@ -61,6 +64,7 @@
m_SelfDownloadContentHandler = NULL;
m_SelfDownloadContentTypes = KNullStr().Alloc();
retryConnectivityFlag = EFalse;
+ m_inSecConnection = EFalse;
m_resetTimer = NULL;
}
@@ -98,11 +102,31 @@
RStringPool strP = m_httpSession.StringPool();
const TStringTable& stringTable = RHTTPSession::GetTable();
RHTTPConnectionInfo connInfo = m_httpSession.ConnectionInfo();
-
- // set shutdown
- THTTPHdrVal immediateShutdown = strP.StringF( HTTP::ESocketShutdownImmediate, stringTable );
- connInfo.SetPropertyL ( strP.StringF( HTTP::ESocketShutdownMode, stringTable ), immediateShutdown );
-
+
+ TBool gracefulShutdown = false;
+ RStringF retStr;
+ TInt err( KErrNone );
+
+#ifdef BRDO_OCC_ENABLED_FF
+ FeatureManager::InitializeLibL();
+ gracefulShutdown = FeatureManager::FeatureSupported( KFeatureIdBrowserGracefulSocketShutdown );
+ FeatureManager::UnInitializeLib();
+ retStr = strP.StringF( HTTP::EHttpEnableOptimalPipelining + 3, stringTable );
+
+#endif
+
+ if( err == KErrNone && gracefulShutdown && retStr != RStringF())
+ {
+ //Property exists
+ THTTPHdrVal setValue(SOCKET_LINGERING_TIMEOUT);
+ connInfo.SetPropertyL ( strP.StringF( HTTP::EHttpEnableOptimalPipelining + 3, stringTable ), setValue );
+ }
+ else
+ {
+ // set shutdown
+ THTTPHdrVal immediateShutdown = strP.StringF( HTTP::ESocketShutdownImmediate, stringTable );
+ connInfo.SetPropertyL ( strP.StringF( HTTP::ESocketShutdownMode, stringTable ), immediateShutdown );
+ }
// set pipelining
RStringF maxConnection = strP.StringF( HTTP::EMaxNumTransportHandlers , stringTable );
connInfo.SetPropertyL( maxConnection, THTTPHdrVal( KHttpMaxConnectionNum ) );
@@ -131,6 +155,11 @@
THTTPHdrVal enableTranspHndlrPriority(strP.StringF(HTTP::EEnableTranspHndlrPriority, RHTTPSession::GetTable()));
connInfo.SetPropertyL(strP.StringF(HTTP::ETranspHndlrPriority, RHTTPSession::GetTable()), enableTranspHndlrPriority);
+#ifdef BRDO_MULTITOUCH_ENABLED_FF
+ RStringF strictHeaders = strP.StringF(HTTP::EEnableStrictConnectHeaders, RHTTPSession::GetTable());
+ connInfo.SetPropertyL(strP.StringF(HTTP::EStrictConnectHeaders, RHTTPSession::GetTable()), strictHeaders);
+#endif
+
strP.OpenL( HttpFilterCommonStringsExt::GetTable() );
strP.OpenL( HttpFilterCommonStringsExt::GetLanguageTable() );
strP.OpenL( HttpFilterCommonStringsAddition::GetTable() );
@@ -344,6 +373,7 @@
const ResourceResponse& response, HttpConnection* connection)
{
RHTTPTransaction* connTransaction = connection->takeOwnershipHttpTransaction();
+ removeRequest(connection);
WebFrame* webFrame = kit(connection->frame());
if (!m_SelfDownloadContentHandler) {
m_SelfDownloadContentHandler = SelfDownloadContentHandler::NewL(
@@ -355,6 +385,7 @@
!= KErrNotSupported) {
if (m_OutstandingSelfDl) {
// only one outstanding self download is supported
+ connTransaction->Close();
User::Leave(KErrCancel);
}
else {
@@ -520,7 +551,6 @@
void HttpSessionManager::startTimer()
{
- RDebug::Printf("hamish HttpSessionManager::startTimer()");
if(m_resetTimer)
deleteTimer();
m_resetTimer = CPeriodic::NewL(CActive::EPriorityStandard);
@@ -536,7 +566,6 @@
TInt doResetFlag(TAny* ptr)
{
- RDebug::Printf("hamish doResetFlag");
HttpSessionManager* tmp = static_cast<HttpSessionManager*>(ptr);
tmp->unSetRetryConnectivityFlag();
tmp->deleteTimer();
--- a/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -266,6 +266,7 @@
case KErrAbort:
default: {
HandleError(httpEvent.iStatus);
+ httpTransaction.Close();
break;
}
}
@@ -410,6 +411,7 @@
HttpFilterCommonStringsExt::GetTable()) );
}
StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->ResetOutstandingSelfDl();
+ httpTransaction.Close();
return status;
}
@@ -436,9 +438,30 @@
{
// Check if the Host Application included this MIME type in the self-download
// content types
- TInt index(m_SelfDlMimeTypes->FindF(contentType));
- return (index != KErrNotFound);
- }
+ TInt cTLength = contentType.Length();
+ TBool isSelfDownloadContentType = EFalse;
+ TInt index = KErrNotFound;
+ const TChar KBrowserSpecLoadObsSemicolon = ';';
+ TPtrC selfDownloadCTs=m_SelfDlMimeTypes->Des();
+ index = selfDownloadCTs.FindF( contentType );
+ while( index != KErrNotFound )
+ {
+ // check for ';' on the left KSemicolon
+ if ( index == 0 ||selfDownloadCTs[ index - 1 ] == KBrowserSpecLoadObsSemicolon )
+ {
+ // check for ';' on the right
+ index += cTLength;
+ if ( index == selfDownloadCTs.Length() || selfDownloadCTs[ index ] == KBrowserSpecLoadObsSemicolon )
+ {
+ isSelfDownloadContentType = ETrue;
+ break;
+ }
+ }
+ selfDownloadCTs.Set( selfDownloadCTs.Mid( index ) );
+ index = selfDownloadCTs.FindF( contentType );
+ }
+ return (isSelfDownloadContentType);
+}
// -----------------------------------------------------------------------------
// SelfDownloadContentHandler::ReinitializeSpecialLoadObserver
--- a/webengine/osswebengine/WebCore/platform/symbian/CookieJarSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/CookieJarSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -37,7 +37,8 @@
String cookies( const KURL& url )
{
- if (cookiesEnabled() && StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()) {
+ if (cookiesEnabled() && StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()&&
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()->cookieManager()) {
long length = 0;
unsigned short* cookies = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()->cookiesForUrl(url.des(), length);
if (cookies) {
@@ -52,7 +53,8 @@
void setCookies( const KURL& url, const KURL& policyURL, const String& cookieStr )
{
- if (cookiesEnabled() && StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()) {
+ if (cookiesEnabled() && StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()&&
+ StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->cookieHandler()->cookieManager()) {
// <http://bugzilla.opendarwin.org/show_bug.cgi?id=6531>, <rdar://4409034>
// cookiesWithResponseHeaderFields doesn't parse cookies without a value
String cookieString = cookieStr.contains('=') ? cookieStr : cookieStr + "=";
--- a/webengine/osswebengine/WebCore/platform/symbian/FontSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/FontSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -65,8 +65,9 @@
PlatformFontCache* cache = StaticObjectsContainer::instance()->fontCache();
CFont* font = cache->zoomedFont(m_fontDescription, cache->fontZoomFactor());
// RenderBlock::layoutColumns create a 0 platform context to do a faked paint
+
// during layout - weird stuff :)
- if (!graphicsContext->platformContext())
+ if (!graphicsContext || !graphicsContext->platformContext())
return;
CFbsBitGc& bitgc = graphicsContext->platformContext()->gc();
--- a/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -247,6 +247,10 @@
if (!m_passwdDB->saveAllowed(realm))
ignorefield = true;
+ // check if username, password value is missing
+ if(!passwd->value() || !input->value())
+ ignorefield = true;
+
// if login info is already saved, don't save again
if (!ignorefield && m_passwdDB->contains(realm, input->name(), input->value(), passwd->name(), passwd->value())) {
ignorefield = true;
--- a/webengine/osswebengine/WebCore/platform/symbian/PluginInfoStoreSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/PluginInfoStoreSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -29,9 +29,8 @@
PluginInfo *PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned index)
{
+ PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
PluginInfo *pluginInfo = new PluginInfo;
- PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
-
if (pluginInfo && pluginHandler) {
TWebCorePluginInfo plugin;
if (pluginHandler->objectAtIndex(index,plugin)) {
--- a/webengine/osswebengine/WebCore/platform/symbian/RenderThemeSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/RenderThemeSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -487,43 +487,10 @@
TSize size = maskedBitmap->SizeInPixels();
size.iWidth = (size.iWidth * scalingFactor) / 100;
size.iHeight = (size.iHeight * scalingFactor) / 100;
- SyncScaler syncScaler;
- TRequestStatus* status = &(syncScaler.iStatus);
-
- m_bitmapScaler = CBitmapScaler::NewL();
- m_bitmapScaler->SetQualityAlgorithm(CBitmapScaler::EMaximumQuality);
- // bitmap;
- CFbsBitmap* bitmap = const_cast<CFbsBitmap*>(&(maskedBitmap->Bitmap()));
- CFbsBitmap* resultBitmap = NULL;
- resultBitmap = new (ELeave) CFbsBitmap;
- CleanupStack::PushL(resultBitmap);
- resultBitmap->Create(size, EColor16M);
- syncScaler.init();
- m_bitmapScaler->Scale(status, *bitmap, *resultBitmap, ETrue);
- if (!m_asw) m_asw = new (ELeave) CActiveSchedulerWait();
- m_asw->Start();
- // If an error occured during scaling, stop!
- User::LeaveIfError(syncScaler.m_error);
+
+ CMaskedBitmap* resultBitmap = maskedBitmap->ScaleImageToSize(size, false);
+ BitmapImage* bi = new (ELeave) BitmapImage(resultBitmap);
- // mask
- CFbsBitmap* mask = const_cast<CFbsBitmap*>(&(maskedBitmap->Mask()));
- CFbsBitmap* resultMask = NULL;
- resultMask = new (ELeave) CFbsBitmap;
- CleanupStack::PushL(resultMask);
- resultMask->Create(size, EGray256);
- syncScaler.init();
- m_bitmapScaler->Scale(status, (*mask), *resultMask, ETrue);
- if (!m_asw) m_asw = new (ELeave) CActiveSchedulerWait();
- m_asw->Start();
- // If an error occured during scaling, stop!
- User::LeaveIfError(syncScaler.m_error);
-
- CMaskedBitmap* mb = NULL;
- mb = new(ELeave) CMaskedBitmap(resultBitmap, resultMask);
- CleanupStack::Pop(2); // resultBitmap, resultMask
- CleanupStack::PushL(mb);
- BitmapImage* bi = new (ELeave) BitmapImage(mb);
- CleanupStack::Pop(); // mb
switch (type) {
case ECheckBoxOn:
delete m_scaledCheckBoxOn;
@@ -551,10 +518,6 @@
m_scalingForSelectArrow = scalingFactor;
break;
}
- delete m_bitmapScaler;
- m_bitmapScaler = NULL;
- delete m_asw;
- m_asw = NULL;
}
void RenderThemeSymbian::run()
--- a/webengine/osswebengine/WebCore/platform/symbian/SharedTimerSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/SharedTimerSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -22,7 +22,7 @@
#include <e32std.h>
#include <e32base.h>
#include <Timer.h>
-
+#include <kjs_window.h>
static TInt64 remainingMicro = 0;
static bool shutdownInProgress = false;
@@ -123,6 +123,8 @@
shutdownInProgress = true;
stopSharedTimer();
TimerBase::deleteTimerHeap();
+
+ KJS::shutdownJSTimer();
}
void initSharedTimer()
--- a/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/StaticObjectsContainer.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -71,6 +71,8 @@
#include "TextBreakIteratorSymbian.h"
#include "ImageSymbian.h"
#include "HTMLElementFactory.h"
+#include "GCController.h"
+#include "bitmap\AnimationDecoderWrapped.h"
#include <eikenv.h>
#include "WidgetEngineBridge.h"
@@ -128,9 +130,11 @@
StaticObjectsContainer::~StaticObjectsContainer()
{
- // Run KJS collector to cleanup any remaining references
- // This must be run before Cache::deleteStaticCache to properly free resources
- KJS::Collector::collect();
+ // Instruct garbage collect for destruction in progress and to stop garbage collection
+ gcController().startedExit(true);
+ KJS::Collector::startedExit(true);
+ CAnimationDecoderWrapped::closeSyncDecodeThread();
+
delete m_oomHandler;
delete m_oomStopper;
FontCache::deleteFontDataCache();
--- a/webengine/osswebengine/WebCore/platform/symbian/TemporaryLinkStubsSymbian.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/TemporaryLinkStubsSymbian.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -112,8 +112,8 @@
void GraphicsContext::setShadow(IntSize const&,int,Color const&) { }
void GraphicsContext::clearShadow() { }
-void GraphicsContext::beginTransparencyLayer(float) { }
-void GraphicsContext::endTransparencyLayer() { }
+/*void GraphicsContext::beginTransparencyLayer(float) { }
+void GraphicsContext::endTransparencyLayer() { }*/
void GraphicsContext::clearRect(const FloatRect&) { }
void GraphicsContext::strokeRect(const FloatRect&, float) { }
void GraphicsContext::setLineCap(LineCap) { }
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -68,10 +68,16 @@
}
using namespace WebCore;
-CSynDecodeThread *CAnimationDecoderWrapped::iSyncDecodeThread = NULL;
const TInt KDownScaleFactor = 2; // scaling is done by a factor of 2.For ex.2,4,8...( similar to ImageViewer )
const TInt KMaxDownScaleFactor = 8; // limit scaling to 8
+CSynDecodeThread *CAnimationDecoderWrapped::iSyncDecodeThread = NULL;
+void CAnimationDecoderWrapped::closeSyncDecodeThread()
+ {
+ delete iSyncDecodeThread;
+ iSyncDecodeThread = NULL; // it shoudn't be dandling in case of DLL load/unload at runtime
+ }
+
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
//
@@ -600,6 +606,7 @@
// Normal image ready
//iDestination = NULL;
iImageState = EInactive;
+ iDestination->SetInitialisationCompletionStatus(ETrue);
iObserver->imageReady(sizeinBytes);
delete iDecoder, iDecoder = NULL;
m_data = NULL;
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h Thu Aug 19 10:58:56 2010 +0300
@@ -78,11 +78,7 @@
_LIT(KMimeDRM, "application/vnd.oma.drm.content");
// FIXME: we should move this back to EColor64K after Symbian fix their Gif image decoder bug.
-#ifdef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
-const TDisplayMode KMaxDepth = EColor64K;
-#else
const TDisplayMode KMaxDepth = EColor16M;
-#endif
// CLASS DECLARATION
/**
* CAnimationDecoderWrapped
@@ -113,6 +109,7 @@
*/
void OpenL( WebCore::SharedBuffer* aData, TDesC* aMIMEType, TBool aIsComplete );
void OpenAndDecodeSyncL( const TDesC8& aData );
+ static void closeSyncDecodeThread();
/*
* From MIHLFileImage, see base class header.
@@ -263,7 +260,7 @@
// Is invalid because the cache got cleared in the middle of decoding
TBool iIsInvalid;
- TBool iCanBeDeleted;
+ TBool iCanBeDeleted;
};
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -83,7 +83,7 @@
CMaskedBitmap::CMaskedBitmap(CFbsBitmap* aBitmap, CFbsBitmap* aMask)
-: iBitmap(aBitmap),iMask(aMask)
+: iBitmap(aBitmap),iMask(aMask),i_DecodingCompleted(ETrue)
{
}
@@ -186,6 +186,8 @@
err = BitmapUtil::CopyBitmap( aBitmap, *iBitmap );
}
}
+ if(!err)
+ SetInitialisationCompletionStatus(ETrue);
return err;
}
@@ -232,6 +234,8 @@
iBitmap->Reset();
}
}
+ if(!err)
+ SetInitialisationCompletionStatus(ETrue);
return err;
}
@@ -250,6 +254,7 @@
{
iBitmap->Reset();
if(iMask) iMask->Reset();
+ SetInitialisationCompletionStatus(EFalse);
}
@@ -487,7 +492,12 @@
void CMaskedBitmap::TileInBitmapRect( CFbsBitmap* trgBmp, const TRect& aTrgRect, const TPoint& aOffset )
{
trgBmp->LockHeap();
-
+
+ if ( aTrgRect.Width() < 0 || aTrgRect.Height() < 0 )
+ {
+ trgBmp->UnlockHeap();
+ return;
+ }
TSize sz = trgBmp->SizeInPixels();
TUint32* buf = (TUint32*)(trgBmp->DataAddress());
@@ -634,16 +644,15 @@
}
-CMaskedBitmap* CMaskedBitmap::ScaleImageToSize( TSize newSize )
+CMaskedBitmap* CMaskedBitmap::ScaleImageToSize( TSize newSize, bool storeScaledImage)
{
- if (iScaledBitmap && iScaledBitmap->SizeInPixels() == newSize)
+
+ if (storeScaledImage && iScaledBitmap && iScaledBitmap->SizeInPixels() == newSize)
return iScaledBitmap;
- delete iScaledBitmap;
- iScaledBitmap = NULL;
- iScaledBitmap = CMaskedBitmap::NewL();
+ CMaskedBitmap* scaledBitmap = CMaskedBitmap::NewL();
- CFbsBitmap& bmp = iScaledBitmap->BitmapModifyable();
+ CFbsBitmap& bmp = scaledBitmap->BitmapModifyable();
bmp.Create(newSize, iBitmap->DisplayMode());
// scale the image quickly
@@ -655,7 +664,7 @@
bitGc->DrawBitmap(TRect(TPoint(0,0), newSize), iBitmap, iBitmap->SizeInPixels());
CleanupStack::PopAndDestroy(2);
- CFbsBitmap& msk = iScaledBitmap->MaskModifyable();
+ CFbsBitmap& msk = scaledBitmap->MaskModifyable();
if( HasMask() ) {
msk.Create(newSize, iMask->DisplayMode());
@@ -668,8 +677,24 @@
bitGc->DrawBitmap(TRect(TPoint(0,0), newSize), iMask, iMask->SizeInPixels());
CleanupStack::PopAndDestroy(2);
}
-
- return iScaledBitmap;
+ if (storeScaledImage) {
+ delete iScaledBitmap;
+ iScaledBitmap = NULL;
+ iScaledBitmap = scaledBitmap;
+ }
+ return scaledBitmap;
}
+void CMaskedBitmap::SetInitialisationCompletionStatus(TBool aDecodingCompleted)
+{
+ i_DecodingCompleted = aDecodingCompleted;
+}
+
+
+TBool CMaskedBitmap::IsCompletlyInitialised()
+{
+ return i_DecodingCompleted;
+}
+
+
// End of File
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/MaskedBitmap.h Thu Aug 19 10:58:56 2010 +0300
@@ -138,7 +138,7 @@
void CompressInBackground( );
- CMaskedBitmap* ScaleImageToSize( TSize newSize );
+ CMaskedBitmap* ScaleImageToSize( TSize newSize, bool storeScaledImage = true);
public: // Internal interface
@@ -209,6 +209,16 @@
* Invert the mask
*/
TBool InvertMask() const { return iInvertMask; }
+
+ /**
+ * Check if the initialisation is comepleted
+ */
+ TBool IsCompletlyInitialised();
+
+ /**
+ * Set True if the initialisation is comepleted
+ */
+ void SetInitialisationCompletionStatus(TBool aInitialisationCompleted);
private: // Private constructors
@@ -230,6 +240,8 @@
TBool iInvertMask;
CMaskedBitmap* iScaledBitmap;
+
+ TBool i_DecodingCompleted;
};
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -40,7 +40,7 @@
TInt iMaskHandle;
};
-enum DecoderState {ENewDecodeRequest, EDecodeInProgress, EDecoderIdle};
+enum DecoderState {ENewDecodeRequest, EDecodeInProgress, EDecoderIdle, EDecoderTerminate};
class CSynDecoder : public CActive
{
public: // Constructors and destructor
@@ -51,6 +51,7 @@
void Open(const TDesC8& aData, TRequestStatus *status);
void Lock() { iDecoderLock.Wait(); }
void Release() { iDecoderLock.Signal(); }
+ void Terminate() { iDecodeState = EDecoderTerminate; }
private: // From base class CActive
void DoCancel();
@@ -70,7 +71,6 @@
CMaskedBitmap* iBitmap;
RFastLock iDecoderLock;
DecoderState iDecodeState;
- RThread syncThread;
friend class CSynDecodeThread;
};
@@ -134,6 +134,7 @@
void CSynDecoder::SetIdle()
{
iDecodeState = EDecoderIdle;
+ iElem.iParentThreadId = 0;
if(!IsActive()) {
iStatus = KRequestPending;
SetActive();
@@ -207,6 +208,12 @@
SignalParent(iStatus.Int());
SetIdle();
break;
+ case EDecoderTerminate:
+ // if any thread is waiting for decode, signal it
+ if( iElem.iParentThreadId )
+ SignalParent(KErrCompletion);
+ CActiveScheduler::Stop();
+ break;
default:
SetIdle();
}
@@ -249,15 +256,32 @@
CSynDecodeThread::~CSynDecodeThread()
{
- CActiveScheduler::Stop();
- iDecoderThread.Close();
+ // signal the thread to do cleanup and stop
+ iSyncDecoder->Terminate();
+ TRequestStatus *ps = &(iSyncDecoder->iStatus);
+ iDecoderThread.RequestComplete(ps, KErrNone);
+
+ iDecoderThread.Close();
}
void CSynDecodeThread::ConstructL()
{
- _LIT(KThreadName, "ImgDecoder");
+ _LIT(KThreadName, "iconDecoder");
RAllocator &allocator = User::Allocator();
- User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, &allocator, NULL));
+ TInt err = iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, &allocator, NULL);
+ if(err == KErrAlreadyExists) {
+ // It may happen only in rare cases, if container browserengine..dll was unloaded and loaded again before
+ // syncDecodeThread could close itself (scheduled). In that case, we kill that thread since we can't reuse that
+ // and create a new one with same name.
+ RThread th;
+ th.Open(KThreadName);
+ th.Kill(KErrNone);
+ th.Close();
+
+ // Leave this time if problem still exists
+ User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, &allocator, NULL));
+ }
+
iDecoderThread.SetPriority(EPriorityMore);
TRequestStatus status = KRequestPending;
iDecoderThread.Rendezvous(status);
--- a/webengine/osswebengine/WebCore/rendering/FixedTableLayout.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/FixedTableLayout.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -163,8 +163,7 @@
int usedSpan = 0;
int i = 0;
- while (usedSpan < span) {
- ASSERT(cCol + i < nEffCols);
+ while (usedSpan < span && cCol + i < nEffCols) {
int eSpan = m_table->spanOfEffCol(cCol + i);
// Only set if no col element has already set it.
if (m_width[cCol + i].isAuto() && w.type() != Auto) {
--- a/webengine/osswebengine/WebCore/rendering/RenderBox.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderBox.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -1449,8 +1449,18 @@
int newHeight = block->calcContentBoxHeight(block->contentHeight());
block->setHeight(oldHeight);
return calcContentBoxHeight(height.calcValue(newHeight));
+ }
+ // As per CSS2, percentage based height computes to 'auto', if the height of the containing block
+ // is not specified explicitly, and this element is not absolutely positioned.
+ // In standard mode, we try to follow this rule.
+ if (!style()->htmlHacks() && cb->style()->height().isAuto() && !isPositioned() && !cb->isRenderView() && !cb->isTableCell()) {
+ IntSize size = intrinsicSize();
+ // Try to keep aspect ratio.
+ int h = size.width() ? calcReplacedWidth() * size.height() / size.width() : size.height();
+ if (h > 0)
+ return calcContentBoxHeight(h);
}
-
+
int availableHeight = isPositioned() ? containingBlockHeightForPositioned(cb) : cb->availableHeight();
// It is necessary to use the border-box to match WinIE's broken
--- a/webengine/osswebengine/WebCore/rendering/RenderFrame.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderFrame.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -74,8 +74,7 @@
if (!m_width || !m_height || !childRoot) {
updateWidgetPosition();
if (childFrameView)
- while (childFrameView->layoutPending())
- childFrameView->layout();
+ childFrameView->layout();
setNeedsLayout(false);
return;
}
@@ -96,9 +95,9 @@
// update again to pass the width to the child frame
updateWidgetPosition();
- do
- childFrameView->layout();
- while (childFrameView->layoutPending() || childRoot->needsLayout());
+
+ childFrameView->layout();
+
if (scrolling || flexibleHeight || childFrameView->frame()->isFrameSet())
m_height = max(m_height, childFrameView->contentsHeight());
--- a/webengine/osswebengine/WebCore/rendering/RenderLayer.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderLayer.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -893,7 +893,7 @@
ExceptionCode ec;
if (difference.width()) {
- if (element && element->isControl()) {
+ if (element->isControl()) {
// Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>).
style->setProperty(CSS_PROP_MARGIN_LEFT, String::number(renderer->marginLeft()) + "px", false, ec);
style->setProperty(CSS_PROP_MARGIN_RIGHT, String::number(renderer->marginRight()) + "px", false, ec);
@@ -904,7 +904,7 @@
}
if (difference.height()) {
- if (element && element->isControl()) {
+ if (element->isControl()) {
// Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>).
style->setProperty(CSS_PROP_MARGIN_TOP, String::number(renderer->marginTop()) + "px", false, ec);
style->setProperty(CSS_PROP_MARGIN_BOTTOM, String::number(renderer->marginBottom()) + "px", false, ec);
--- a/webengine/osswebengine/WebCore/rendering/RenderObject.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderObject.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -2142,11 +2142,10 @@
bool affectsParentBlock = false;
RenderStyle::Diff d = RenderStyle::Equal;
if (m_style) {
- d = m_style->diff(style);
-
// If our z-index changes value or our visibility changes,
// we need to dirty our stacking context's z-order list.
if (style) {
+ d = m_style->diff(style);
if (m_style->visibility() != style->visibility() ||
m_style->zIndex() != style->zIndex() ||
m_style->hasAutoZIndex() != style->hasAutoZIndex())
--- a/webengine/osswebengine/WebCore/rendering/RenderPartObject.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderPartObject.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -366,7 +366,7 @@
int RenderPartObject::calcReplacedWidth() const
{
- if (m_widget && (m_widget->getView())->hasResized()) {
+ if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized()) {
IntRect newRect = m_widget->frameGeometry();
int newWidth = newRect.width();
if (newWidth > 0) {
@@ -378,7 +378,7 @@
int RenderPartObject::calcReplacedHeight() const
{
- if (m_widget && (m_widget->getView())->hasResized()) {
+ if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized()) {
IntRect newRect = m_widget->frameGeometry();
int newHeight = newRect.height();
if (newHeight > 0) {
--- a/webengine/osswebengine/WebCore/rendering/RenderSlider.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderSlider.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -191,10 +191,12 @@
style->setDisplay(BLOCK);
style->setPosition(RelativePosition);
- if (parentStyle->appearance() == SliderVerticalAppearance)
- style->setAppearance(SliderThumbVerticalAppearance);
- else if (parentStyle->appearance() == SliderHorizontalAppearance)
- style->setAppearance(SliderThumbHorizontalAppearance);
+ if(parentStyle) {
+ if (parentStyle->appearance() == SliderVerticalAppearance)
+ style->setAppearance(SliderThumbVerticalAppearance);
+ else if (parentStyle->appearance() == SliderHorizontalAppearance)
+ style->setAppearance(SliderThumbHorizontalAppearance);
+ }
return style;
}
--- a/webengine/osswebengine/WebCore/rendering/RenderText.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderText.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -1042,8 +1042,15 @@
if (!s->m_len) {
// We want the box to be destroyed.
s->remove();
+ if (m_firstTextBox == s)
+ m_firstTextBox = s->nextTextBox();
+ else
+ s->prevTextBox()->setNextLineBox(s->nextTextBox());
+ if (m_lastTextBox == s)
+ m_lastTextBox = s->prevTextBox();
+ else
+ s->nextTextBox()->setPreviousLineBox(s->prevTextBox());
s->destroy(renderArena());
- m_firstTextBox = m_lastTextBox = 0;
return;
}
@@ -1238,7 +1245,7 @@
#ifdef CHECK_CONSISTENCY
const InlineTextBox* prev = 0;
for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) {
- ASSERT(child->object() == this);
+ ASSERT(child->renderer() == this);
ASSERT(child->prevTextBox() == prev);
prev = child;
}
--- a/webengine/osswebengine/WebCore/rendering/RenderTextFragment.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderTextFragment.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -69,6 +69,10 @@
m_firstLetter = 0;
m_start = 0;
m_end = textLength();
+ if (Node* t = node()) {
+ ASSERT(!t->renderer());
+ t->setRenderer(this);
+ }
}
}
--- a/webengine/osswebengine/WebKit/s60/group/bwinscw/JavaScriptCore_3_2u.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/bwinscw/JavaScriptCore_3_2u.def Thu Aug 19 10:58:56 2010 +0300
@@ -246,4 +246,6 @@
JSStringGetCharactersPtr @ 245 NONAME
JSStringGetLength @ 246 NONAME
NPN_Enumerate @ 247 NONAME
+ ?isExitInProgress@Collector@KJS@@SA_NXZ @ 248 NONAME ; bool KJS::Collector::isExitInProgress(void)
+ ?startedExit@Collector@KJS@@SAX_N@Z @ 249 NONAME ; void KJS::Collector::startedExit(bool)
--- a/webengine/osswebengine/WebKit/s60/group/bwinscw/JavaScriptCoreu.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/bwinscw/JavaScriptCoreu.def Thu Aug 19 10:58:56 2010 +0300
@@ -226,4 +226,6 @@
?find@UString@KJS@@QBEHABV12@H@Z @ 225 NONAME ; int KJS::UString::find(class KJS::UString const &, int) const
?roundValue@KJS@@YANPAVExecState@1@PAVJSValue@1@@Z @ 226 NONAME ; double KJS::roundValue(class KJS::ExecState *, class KJS::JSValue *)
?append@UString@KJS@@QAEAAV12@PBD@Z @ 227 NONAME ; class KJS::UString & KJS::UString::append(char const *)
+ ?isExitInProgress@Collector@KJS@@SA_NXZ @ 228 NONAME ; bool KJS::Collector::isExitInProgress(void)
+ ?startedExit@Collector@KJS@@SAX_N@Z @ 229 NONAME ; void KJS::Collector::startedExit(bool)
--- a/webengine/osswebengine/WebKit/s60/group/bwinscw/browserengineu.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/bwinscw/browserengineu.def Thu Aug 19 10:58:56 2010 +0300
@@ -46,8 +46,5 @@
?getNumber@JSValue@KJS@@QBE_NAAN@Z @ 45 NONAME ; bool KJS::JSValue::getNumber(double &) const
?PostUrlL@CBrCtl@@UAEXABVTDesC16@@ABVTDesC8@@1PBV3@PAX@Z @ 46 NONAME ; void CBrCtl::PostUrlL(class TDesC16 const &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const *, void *)
?TakeSnapshotL@CBrCtl@@UAEXAAVCFbsBitmap@@@Z @ 47 NONAME ; void CBrCtl::TakeSnapshotL(class CFbsBitmap &)
-
-
+ ?IsSynchRequestPending@CBrCtl@@UAEHXZ @ 48 NONAME ; int CBrCtl::IsSynchRequestPending(void)
-
-
--- a/webengine/osswebengine/WebKit/s60/group/eabi/JavaScriptCoreU.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/eabi/JavaScriptCoreU.def Thu Aug 19 10:58:56 2010 +0300
@@ -521,4 +521,6 @@
_ZN3KJS7UString4fromEj @ 520 NONAME
_ZNK3KJS7UString4findERKS0_i @ 521 NONAME
_ZN3KJS7UString6appendEPKc @ 522 NONAME
+ _ZN3KJS9Collector11startedExitEb @ 523 NONAME
+ _ZN3KJS9Collector16isExitInProgressEv @ 524 NONAME
--- a/webengine/osswebengine/WebKit/s60/group/eabi/JavaScriptCore_3_2U.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/eabi/JavaScriptCore_3_2U.def Thu Aug 19 10:58:56 2010 +0300
@@ -541,4 +541,6 @@
JSValueMakeUndefined @ 540 NONAME
JSValueProtect @ 541 NONAME
NPN_Enumerate @ 542 NONAME
+ _ZN3KJS9Collector11startedExitEb @ 543 NONAME
+ _ZN3KJS9Collector16isExitInProgressEv @ 544 NONAME
--- a/webengine/osswebengine/WebKit/s60/group/eabi/browserengineu.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/eabi/browserengineu.def Thu Aug 19 10:58:56 2010 +0300
@@ -51,11 +51,4 @@
_ZTI14HistoryHandler @ 50 NONAME ; #<TI>#
_ZTV14HistoryHandler @ 51 NONAME ; #<VT>#
_ZN6CBrCtl13TakeSnapshotLER10CFbsBitmap @ 52 NONAME
-
-
-
-
-
-
-
-
+ _ZN6CBrCtl21IsSynchRequestPendingEv @ 53 NONAME
\ No newline at end of file
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -164,7 +164,6 @@
m_ref(1),
m_oldRect(TRect(0,0,0,0)),
m_oldViewport(TRect(0,0,0,0)),
- m_loadmode(ELoadModeNone),
m_NPObject(0),
m_handle(-1),
m_instance(0),
@@ -421,6 +420,25 @@
}
+// ----------------------------------------------------------------------------
+// PluginSkin::HandleLosingForeground()
+// PluginSkin function to handle Losing foreground event
+// ----------------------------------------------------------------------------
+void PluginSkin::HandleLosingForeground()
+{
+ if(m_pluginwin)
+ m_pluginwin->HandleLosingForeground();
+}
+
+// ----------------------------------------------------------------------------
+// PluginSkin::HandleGainingForeground()
+// PluginSkin function to handle Gaining foreground event
+// ----------------------------------------------------------------------------
+void PluginSkin::HandleGainingForeground()
+{
+ if(m_pluginwin)
+ m_pluginwin->HandleGainingForeground();
+}
// ----------------------------------------------------------------------------
// PluginSkin::pluginFocusChanged()
@@ -724,11 +742,9 @@
NPError error( NPERR_NO_ERROR );
m_instance = (NPP) User::AllocL(sizeof(NPP_t));
- m_instance->ndata = pluginWin();
- m_instance->pdata = NULL;
-
if (m_instance) {
-
+ m_instance->ndata = pluginWin();
+ m_instance->pdata = NULL;
PluginHandler* pluginhandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
if ( pluginhandler ) {
pluginhandler->loadPluginL( m_handle, &m_pluginfuncs );
@@ -745,9 +761,9 @@
}
if (m_pluginwin) {
m_pluginwin->ConstructL(*(control(m_frame)->webView()));
+ }
}
}
- }
switch ( error ) {
case NPERR_OUT_OF_MEMORY_ERROR: {
@@ -758,13 +774,11 @@
User::Leave( KErrNotSupported );
break;
}
- }
+ }
if (m_pluginwin)
- m_pluginwin->SetExtent( TPoint(0,0), TSize(0,0) );
-
+ m_pluginwin->SetExtent( TPoint(0,0), TSize(0,0) );
}
-
}
// -----------------------------------------------------------------------------
@@ -874,7 +888,6 @@
int PluginSkin::getRequestL(const TDesC8& url, bool notify, void* notifydata,const TDesC* aWindowType)
{
TPluginLoadMode loadmode = GetLoadMode(aWindowType);
- setLoadMode(loadmode);
if (url.Ptr() == NULL ) {
return KErrArgument;
@@ -1275,37 +1288,46 @@
void PluginSkin::reCreatePlugin()
{
- //destroy the plugin
+ TBuf16<4> apId;
+ apId.Format( _L("%d"), m_frame->frameView()->topView()->accessPointId() );
- Vector<PluginStream*> streams;
- for (HashSet<PluginStream*>::iterator it = m_streams.begin(); it != m_streams.end(); ++it) {
- streams.append(*it);
- }
- for (int i=0; i<streams.size(); ++i) {
- streams[i]->close();
- }
- m_streams.clear();
-
- if (m_instance && m_pluginfuncs && m_pluginfuncs->destroy) {
- m_pluginfuncs->destroy(m_instance, NULL);
+ if (m_pluginwin ) {
+ m_pluginwin->notifyAPChange((void*)&apId);
}
- User::Free(m_instance); m_instance = 0;
- delete m_pluginwin; m_pluginwin = 0;
- delete iJavascriptTimer; iJavascriptTimer = 0;
+
+ if (m_streams.size() > 0) {
+
+ //destroy the plugin
- RFs& rfs = StaticObjectsContainer::instance()->fsSession();
- for(TInt i=0; i < m_tempFilesArray.Count(); i++)
- {
- rfs.Delete(m_tempFilesArray[i]->Des());
+ Vector<PluginStream*> streams;
+ for (HashSet<PluginStream*>::iterator it = m_streams.begin(); it != m_streams.end(); ++it) {
+ streams.append(*it);
+ }
+ for (int i=0; i<streams.size(); ++i) {
+ streams[i]->close();
+ }
+ m_streams.clear();
+
+ if (m_instance && m_pluginfuncs && m_pluginfuncs->destroy) {
+ m_pluginfuncs->destroy(m_instance, NULL);
}
- m_tempFilesArray.ResetAndDestroy();
-
- //create/load the destroyed plugin again
-
- NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(m_url->Des(), this, core(m_frame));
- if (pluginloader) {
- pluginloader->start();
- }
+ User::Free(m_instance); m_instance = 0;
+ delete m_pluginwin; m_pluginwin = 0;
+ delete iJavascriptTimer; iJavascriptTimer = 0;
+
+ RFs& rfs = StaticObjectsContainer::instance()->fsSession();
+ for(TInt i=0; i < m_tempFilesArray.Count(); i++) {
+ rfs.Delete(m_tempFilesArray[i]->Des());
+ }
+ m_tempFilesArray.ResetAndDestroy();
+
+ //create/load the destroyed plugin again
+
+ NetscapePlugInStreamLoaderClient* pluginloader = NetscapePlugInStreamLoaderClient::NewL(m_url->Des(), this, core(m_frame));
+ if (pluginloader) {
+ pluginloader->start();
+ }
+ }
}
// -----------------------------------------------------------------------------
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.h Thu Aug 19 10:58:56 2010 +0300
@@ -201,6 +201,18 @@
TBool isBrowserScheme(const TPtrC8& url);
/**
+ * HandleLosingForeground
+ * Handles losing Foreground event
+ */
+ void HandleLosingForeground();
+
+ /**
+ * HandleLosingForeground
+ * Handles Gaining Foreground event
+ */
+ void HandleGainingForeground();
+
+ /**
*
* GetLoadMode
* Returns the load mode associated with the "window-type".
@@ -417,8 +429,6 @@
void setElement(WebCore::Element* aElement) {m_element = aElement;}
void reCreatePlugin();
TInt activeStreams() { return m_streams.size(); }
- TPluginLoadMode getLoadMode(){return m_loadmode;}
- void setLoadMode(TPluginLoadMode mode){m_loadmode = mode;}
void NotifyPluginsForScrollOrPinch(bool status);
public: // from MMemoryCollector
TUint Collect(unsigned int aRequired);
@@ -437,6 +447,9 @@
return iGenericElementArray;
}
void setPluginWinClipedRect();
+ TBool isFlashPlugin(){
+ return m_flashContent;
+ }
TBool IsCollectBitmapSupported();
WebFrame* getWebFrame() const {return m_frame;}
void activateVisiblePlugins();
@@ -484,7 +497,6 @@
RArray<NPN_GenericElement>* iGenericElementArray;
TRect m_oldRect;
TRect m_oldViewport;
- TPluginLoadMode m_loadmode;
NPObject* m_NPObject;
public:
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginStream.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStream.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -56,7 +56,7 @@
m_loaderclient->stop();
}
-void PluginStream::createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length)
+void PluginStream::createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length, const char* headers)
{
NPError error( NPERR_NO_ERROR );
@@ -84,7 +84,8 @@
m_stream->url = url16->AllocL();
m_stream->end = length;
m_stream->lastmodified = 0;
- m_stream->notifyData = m_notifydata;
+ m_stream->notifyData = m_notifydata;
+ m_stream->headers = headers;
error = m_pluginskin->getNPPluginFucs()->newstream ( m_pluginskin->getNPP(),
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginStream.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStream.h Thu Aug 19 10:58:56 2010 +0300
@@ -37,7 +37,7 @@
virtual ~PluginStream();
public:
- void createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length);
+ void createNPStreamL(TPtrC8 url, TPtrC16 mimetype, long long length, const char* headers);
void writeStreamL(const char* data, int length);
void destroyStream(int reason, TDesC* failedUrl=NULL);
void close();
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -167,11 +167,20 @@
cancelWithError(ResourceError(String(response.url()), KErrGeneral, String(response.url()), String(response.httpStatusText())));
return;
}
-
+
+ // Currently we fill only response encoding type in the header field of NPStream structure, as url,MimeType and content-Length
+ // are already a part of NPStream Structure
+
+ HBufC8* headerPtr = HBufC8::NewLC(response.textEncodingName().length() + 1);
+ headerPtr->Des().Copy(response.textEncodingName().des());
+ headerPtr->Des().Append('\0');
+ const char* headers = (const char*)headerPtr->Ptr();
+
if (m_pluginstream) {
- TRAP(m_error, m_pluginstream->createNPStreamL(response.url().des(), response.mimeType().des(), response.expectedContentLength()));
+ TRAP(m_error, m_pluginstream->createNPStreamL(response.url().des(), response.mimeType().des(), response.expectedContentLength(), headers));
}
-
+
+ CleanupStack::PopAndDestroy(headerPtr);
}
void NetscapePlugInStreamLoaderClient::didReceiveData(const char* data, int length, long long lengthReceived)
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -394,14 +394,6 @@
{
CCoeControl::MakeVisible(visible);
}
- TPluginLoadMode loadmode = m_pluginskin->getLoadMode();
- if(loadmode == ELoadModeNew ){
- m_pluginskin->setLoadMode(ELoadModeNone);
- if(visible)
- HandleGainingForeground();
- else
- HandleLosingForeground();
- }
PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
int index = pluginHandler->getVisiblePlugins().Find(m_pluginskin);
@@ -584,11 +576,12 @@
}
else {
WebFrame* mf = (m_pluginskin->frame());
- WebFrameView* fv = mf->frameView();
- TRect rect(Rect());
- rect = TRect(fv->viewCoordsInFrameCoords(Rect().iTl), fv->viewCoordsInFrameCoords(Rect().iBr));
- if (mf && mf->frameView())
- mf->frameView()->invalidateRect(rect, drawNow);
+ if (mf && mf->frameView()) {
+ WebFrameView* fv = mf->frameView();
+ TRect rect(Rect());
+ rect = TRect(fv->viewCoordsInFrameCoords(Rect().iTl), fv->viewCoordsInFrameCoords(Rect().iBr));
+ fv->invalidateRect(rect, drawNow);
+ }
}
}
@@ -772,7 +765,24 @@
{
if(m_notifier) {
if (status) {
+ //if plugin fails to send bitmap even though the "ECollectBitmapSupported"
+ CBrCtl* brCtl = control(m_pluginskin->frame());
+ WebView* view = brCtl->webView();
+
+ if(view && view->isPinchZoom())
+ m_PluginInvisibleOnPinchZoom = ETrue;
m_notifier->NotifyL( MPluginNotifier::ECollectBitmap, (void*)1 );
+
+ //if Notify CollectBitmap failed to send bitmap to SetBitmapFromPlugin,
+ //Then forcefully make the plugin window invisible for pinch zoom
+ if(m_PluginInvisibleOnPinchZoom)
+ {
+ m_PluginInvisibleOnPinchZoom = EFalse;
+ if (IsVisible())
+ {
+ MakeVisible(false);
+ }
+ }
}
else {
m_notifier->NotifyL( MPluginNotifier::ECollectBitmap, (void*)0 );
@@ -927,8 +937,7 @@
// -----------------------------------------------------------------------------
void PluginWin::SetBitmapFromPlugin(TInt aHandle)
{
-
-// m_pluginfocus = 1;
+ m_PluginInvisibleOnPinchZoom = EFalse;
if (aHandle)
{
@@ -994,3 +1003,11 @@
gc.DrawBitmap(plWinRect, m_pausedBitmap);
context->restore(saved);
}
+
+// Notify Plugins about the change in Access Point during Upgrade / Downgrade
+void PluginWin::notifyAPChange(void* ap)
+{
+ if (m_notifier) {
+ m_notifier->NotifyL( MPluginNotifier::EAccesPointChanged, ap );
+ }
+}
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h Thu Aug 19 10:58:56 2010 +0300
@@ -490,6 +490,7 @@
void ClearPluginBitmap();
TBool IsCollectBitmapSupported();
void drawBitmapToWebCoreContext();
+ void notifyAPChange(void* ap);
protected: // New functions
/**
@@ -519,6 +520,7 @@
CFbsBitmap* m_pausedBitmap; //Plugin paused Bitmap
bool m_pluginHasBitmap;
bool m_BitmapSupported;
+ bool m_PluginInvisibleOnPinchZoom;
};
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -185,7 +185,10 @@
delete rep;
if ( scriptLogType == TBrCtlDefs::EScriptLogDisable )
+ {
+ fsSession.Close();
return;
+ }
TBool needLogFile = EFalse, needLogConsole = EFalse;
// construct the log message
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -115,14 +115,13 @@
//NSView <WebDocumentView> *documentView = [v _makeDocumentViewForDataSource:ds];
//if (!documentView)
// return;
-
- if (m_webFrame &&
- m_webFrame->frameView() &&
- m_webFrame->frameView()->topView()&&
- !m_webFrame->parentFrame()) {
-
- m_webFrame->frameView()->topView()->setEditable(false);
- }
+ if(m_webFrame) {
+ if (m_webFrame->frameView() &&
+ m_webFrame->frameView()->topView()&&
+ !m_webFrame->parentFrame()) {
+ m_webFrame->frameView()->topView()->setEditable(false);
+ }
+
WebFrameBridge *bridge = m_webFrame->bridge();
// FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
@@ -130,6 +129,7 @@
bridge->createFrameViewWithScrollView(v, v->marginWidth(), v->marginHeight());
//m_webFrame.get() _updateBackground];
bridge->installInFrame(v);
+ }
// Call setDataSource on the document view after it has been placed in the view hierarchy.
// This what we for the top-level view, so should do this for views in subframes as well.
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -90,6 +90,7 @@
#include "GCController.h"
#include <BrowserVersion.h>
#include <cuseragent.h>
+#include "kjs_window.h"
#ifndef BRDO_WML_DISABLED_FF
#include "wmlinterface.h"
@@ -422,6 +423,7 @@
, m_brCtlDownloadObserver(aBrCtlDownloadObserver)
, m_windoCloseTimer(NULL)
, m_didFirstLayout(false)
+ , m_NotifyPluginFocusChangeEvent(false)
{
m_documentHeight = 0;
m_displayHeight = 0;
@@ -678,6 +680,13 @@
break;
}
+ case TBrCtlDefs::ECommandOOMExit:
+ {
+ WebCore::gcController().startedExit(true);
+ KJS::setDeferringJSTimers(true);
+ break;
+ }
+
case TBrCtlDefs::ECommandShowThumbnailView:
{
if (m_webView->pageView()) {
@@ -1038,12 +1047,17 @@
// Messages sent by OOM monitor
case TBrCtlDefs::ECommandFreeMemory:
{
- //MemoryManager::FreeRam(); // invoke memory collect operation - enable later, causes BC break
+ MemoryManager::FreeRam(); // invoke memory collect operation
break;
}
case TBrCtlDefs::ECommandMemoryGood:
{
- //MemoryManager::RestoreCollectors(); // restore collectors - enable later, causes BC break
+ MemoryManager::RestoreCollectors(); // restore collectors
+ break;
+ }
+ case TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent:
+ {
+ m_NotifyPluginFocusChangeEvent = true;
break;
}
@@ -1079,6 +1093,13 @@
}
}
+
+EXPORT_C TBool CBrCtl::IsSynchRequestPending()
+ {
+ return m_webView->isSynchRequestPending();
+ }
+
+
// -----------------------------------------------------------------------------
// CBrCtl::HandleDownloadCommandL
// This method calls to download manager in order to send commands to the DlMgr
@@ -1282,9 +1303,11 @@
// tot fixme
//TPluginControl pluginControl(*iWebKitControl);
//pluginControl.AddPluginOptionMenuItemsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter);
- PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
- if(plugin && plugin->pluginWin())
- plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
+ if(m_webView) {
+ PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
+ if(plugin && plugin->pluginWin())
+ plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
+ }
}
@@ -1886,6 +1909,11 @@
}
else if(m_webView->mainFrame()->frameLoader()->checkScheduledRedirection())
m_webView->mainFrame()->frameLoader()->startRedirectionTimerNow();
+
+ if( m_NotifyPluginFocusChangeEvent ) {
+ m_NotifyPluginFocusChangeEvent = false;
+ webView()->mainFrame()->notifyPluginFocusChangeEvent(visible);
+ }
m_webView->MakeVisible(visible);
}
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.h Thu Aug 19 10:58:56 2010 +0300
@@ -414,6 +414,8 @@
*/
IMPORT_C void TakeSnapshotL(CFbsBitmap& snapshot);
+ IMPORT_C TBool IsSynchRequestPending();
+
/**
* From CBrCtlInterface
* Register an observer for state change changes
@@ -731,7 +733,7 @@
MBrCtlDownloadObserver* m_brCtlDownloadObserver;
CPeriodic* m_windoCloseTimer; //new timer for managing browser window close
bool m_didFirstLayout;
-
+ bool m_NotifyPluginFocusChangeEvent;
};
#endif // BRCTL_H
--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -136,21 +136,27 @@
// -----------------------------------------------------------------------------
// WebCursor::setCurrentView
// -----------------------------------------------------------------------------
-void WebCursor::setCurrentView(WebView& view)
- {
- if (!m_view)
+void WebCursor::setCurrentView(WebView* view)
{
- m_view = &view;
- TRAP_IGNORE( constructSpriteL() );
- }
+
+ if( !view )
+ {
+ m_view = view;
+ m_sprite->Hide();
+ m_sprite->SetParent(NULL);
+ return ;
+ }
//switching between diffrent webviews, set current webview as the parent to m_sprite
- if( m_sprite->Parent() != &view)
- {
- m_view = &view;
- CCoeControl* parent = static_cast<CCoeControl*>(m_view);
+ if( (m_sprite && m_sprite->Parent() != view) || !m_sprite)
+ {
+ m_view = view;
+ if( !m_sprite )
+ constructSpriteL();
+ CCoeControl* parent = static_cast<CCoeControl*>(view);
m_sprite->SetParent(parent);
- }
- m_view = &view;
+ m_sprite->Show();
+ }
+ m_view = view;
setOpaqueUntil(KTransparencyTime);
m_transcount = 0;
}
@@ -190,9 +196,10 @@
CleanupStack::PopAndDestroy();
/////////////////////////////////
+ TPoint pos = TPoint(KInitialOffset,KInitialOffset);
CCoeControl* parent = static_cast<CCoeControl*>(m_view);
- TPoint pos = TPoint(KInitialOffset,KInitialOffset);
- m_sprite = CWebSprite::NewL(parent, pos, m_arrow.m_img, m_arrow.m_msk, ETrue);
+ m_sprite = CWebSprite::NewL(parent,pos, m_arrow.m_img, m_arrow.m_msk, ETrue);
+ m_sprite->Hide();
}
// -----------------------------------------------------------------------------
--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.h Thu Aug 19 10:58:56 2010 +0300
@@ -51,7 +51,7 @@
const TRect& nodeRect() const { return m_nodeRect; }
void setPosition(const TPoint& pt) { m_pos = pt;}
void updatePositionAndElemType(const TPoint& pt);
- void setCurrentView(WebView& view);
+ void setCurrentView(WebView* view);
void offsetCursor(const TPoint& offset);
bool isVisible() const { return m_visible; }
void setCursorVisible(bool visible) { m_visible = visible; }
@@ -73,7 +73,8 @@
WebFrame* getFrameAtPoint(const TPoint& viewPos_);
WebCore::Element* getElementUnderCursor() {return m_elementUnderCursor;}
void stopTransparencyTimer();
-
+ WebView* getCursorWebView(){ return m_view;}
+
private:
void moveCursor(int lr,int tb, int scrollRange);
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -160,10 +160,7 @@
state->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY);
state->SetNumericKeymap(EAknEditorStandardNumberModeKeymap);
state->SetCcpuState(NULL);
- TLanguage language = User::Language();
- if (language == ELangPrcChinese ) {
- TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateFlagsUpdate ) );
- }
+ TRAP_IGNORE( state->ReportAknEdStateEventL(MAknEdStateObserver::EAknEdwinStateFlagsUpdate ) );
}
}
else {
@@ -259,7 +256,7 @@
if ( sc->isInPasswordField() ) {
caps |= TCoeInputCapabilities::ESecretText;
- UpdateFlagsState(EAknEditorFlagNoT9);
+ UpdateFlagsState(EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly);
}
else {
@@ -445,7 +442,7 @@
// see WebEditorClient::handleKeypress
Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
Node* focusedNode = frame->document()->focusedNode();
- if ( frame && focusedNode) {
+ if ( focusedNode ) {
TInt lowPos = aCursorSelection.LowerPos();
TInt highPos = aCursorSelection.HigherPos();
if (focusedNode->hasTagName(HTMLNames::textareaTag)) {
@@ -472,7 +469,7 @@
Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
Node* focusedNode = frame->document()->focusedNode();
- if (frame && focusedNode) {
+ if (focusedNode) {
if (focusedNode->hasTagName(HTMLNames::textareaTag)) {
HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(focusedNode);
TInt anchorPos = textArea->selectionStart();
@@ -555,13 +552,13 @@
if ( sc ){
IntRect rect = sc->caretRect();
Node* editNode = sc->focusNode();
- TPoint viewPoint = kit(frame)->frameView()->frameCoordsInViewCoords(editNode->getRect().Rect().iBr);
- xPos = viewPoint.iX;
- yPos = frame->document()->focusedNode()->getRect().bottomLeft().y() + rect.height();
- String str;
- if ( editNode &&
- editNode->isTextNode() ) {
- WebCore::Text* aText = (WebCore::Text*)editNode;
+ if ( editNode && editNode->isTextNode() ) {
+ TPoint viewPoint = kit(frame)->frameView()->frameCoordsInViewCoords(editNode->getRect().Rect().iBr);
+ xPos = viewPoint.iX;
+ yPos = frame->document()->focusedNode()->getRect().bottomLeft().y() + rect.height();
+
+ String str;
+ WebCore::Text* aText = (WebCore::Text*)editNode;
str = aText->data();
aDocumentPosition = aText->length();
TInt position = aDocumentPosition - ( str.reverseFind(KBlankDesC(), aDocumentPosition )+1);
@@ -1125,7 +1122,7 @@
// -----------------------------------------------------------------------------
TBool CWebFepTextEditor::CcpuIsFocused() const
{
- return ETrue;
+ return (IsTextAreaFocused() || IsInputElementFocused());
}
// -----------------------------------------------------------------------------
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -285,7 +285,15 @@
PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler();
WTF::HashSet<PluginSkin*> pluginObjs = plghandler->pluginObjects();
for(WTF::HashSet<PluginSkin*>::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) {
- notifyPluginOfPositionChange(static_cast<PluginSkin*> (*it));
+ PluginSkin* plg = static_cast<PluginSkin*> (*it);
+ WebFrame* plgWebFrame = plg->getWebFrame();
+ CBrCtl* plbrCtl = control(plg->frame());
+ CBrCtl* pgbrCtl = control(this);
+
+ if(plbrCtl == pgbrCtl)
+ {
+ notifyPluginOfPositionChange(static_cast<PluginSkin*> (*it));
+ }
}
}
@@ -436,7 +444,9 @@
WebFrame* kit(Frame* frame)
{
- return frame ? ((WebFrameBridge *)frame->bridge())->webFrame(): NULL;
+ if( frame && frame->bridge() )
+ return ((WebFrameBridge *)frame->bridge())->webFrame();
+ return NULL;
}
WebView *kit(Page* page)
@@ -603,6 +613,38 @@
}
+void WebFrame::notifyPluginFocusChangeEvent(TBool visible)
+{
+ MWebCoreObjectWidget* view = NULL;
+ Frame* coreFrame = core(this);
+
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+
+ PassRefPtr<HTMLCollection> objects = frame->document()->objects();
+ for (Node* n = objects->firstItem(); n; n = objects->nextItem()) {
+ view = widget(n);
+ if (view && static_cast<PluginSkin*>(view)->isFlashPlugin()) {
+ if(visible)
+ static_cast<PluginSkin*>(view)->HandleGainingForeground();
+ else
+ static_cast<PluginSkin*>(view)->HandleLosingForeground();
+ }
+ }
+
+ PassRefPtr<HTMLCollection> embeds = frame->document()->embeds();
+ for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) {
+ view = widget(n);
+ if (view && static_cast<PluginSkin*>(view)->isFlashPlugin()) {
+ if(visible)
+ static_cast<PluginSkin*>(view)->HandleGainingForeground();
+ else
+ static_cast<PluginSkin*>(view)->HandleLosingForeground();
+ }
+ }
+ }
+
+}
+
void WebFrame::reCreatePlugins()
{
MWebCoreObjectWidget* view = NULL;
@@ -615,8 +657,7 @@
view = widget(n);
if (view) {
plg = static_cast<PluginSkin*>(view);
- if (plg->activeStreams() > 0)
- plg->reCreatePlugin();
+ plg->reCreatePlugin();
}
}
PassRefPtr<HTMLCollection> embeds = frame->document()->embeds();
@@ -624,8 +665,7 @@
view = widget(n);
if (view) {
plg = static_cast<PluginSkin*>(view);
- if (plg->activeStreams() > 0)
- plg->reCreatePlugin();
+ plg->reCreatePlugin();
}
}
}
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.h Thu Aug 19 10:58:56 2010 +0300
@@ -110,6 +110,11 @@
WebCore::Node* getClosestAnchorElement(const TPoint& pt, TPoint& newPos);
void ScrollOrPinchStatus(bool status);
+
+ /**
+ * Notify Flash Plugin FocusChangeEvent
+ */
+ void notifyPluginFocusChangeEvent(TBool visible);
private:
WebFrame(const WebFrame&); // not implemented
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -288,10 +288,11 @@
return TRect(m_contentPos, s );
}
-void WebFrameView::scrollTo(const TPoint& aPoint)
+void WebFrameView::scrollTo(const TPoint& aPoint, TBool aPluginPause)
{
-
- m_topView->scrollStatus(ETrue);
+
+ if(aPluginPause)
+ m_topView->scrollStatus(ETrue);
if (m_parent) {
// tot:fixme frame scrolling when frame-flat is off
@@ -423,7 +424,6 @@
{
// this will also update scrollbars is necessary
scrollTo(p);
- m_topView->scrollStatus(false);
}
else if (!m_parent) {
// top level
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h Thu Aug 19 10:58:56 2010 +0300
@@ -41,7 +41,7 @@
// from MScrollView
void draw(WebCoreGraphicsContext&, const TRect&);
void invalidateRect(const TRect&, TBool);
- void scrollTo(const TPoint&);
+ void scrollTo(const TPoint&, TBool aNotifyPlugins=EFalse);
TRect visibleRect() const;
TSize contentSize() const;
void resizeContent(const TSize& /*aSize*/);
--- a/webengine/osswebengine/WebKit/s60/webview/WebPageFullScreenHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPageFullScreenHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -29,7 +29,7 @@
using namespace WebCore;
const int KFullScreenButtonOffset = 50;
-const int KFullScreenButtonBuff = 5;
+const int KFullScreenButtonBuff = 15;
// -----------------------------------------------------------------------------
// WebPageFullScreenHandler::NewL
@@ -91,6 +91,13 @@
return pos;
}
+TSize WebPageFullScreenHandler::CalculateSize()
+{
+ TSize size = m_buttonIcon.m_img->SizeInPixels();
+ size += TSize(KFullScreenButtonBuff, KFullScreenButtonBuff);
+ return size;
+}
+
//-------------------------------------------------------------------------------
// WebPageFullScreenHandler::showEscBtnL
// Draws the full screen button on the screen
@@ -125,6 +132,8 @@
if (AknLayoutUtils::PenEnabled()) {
TPoint pos = CalculatePosition();
SetPos(pos);
+ TSize size = CalculateSize();
+ SetSizeWithoutNotification(size);
}
}
@@ -150,7 +159,7 @@
case TPointerEvent::EButton1Up:
{
TPoint fsPostion = PositionRelativeToScreen();
- TRect fsRect = TRect(fsPostion,m_buttonIcon.m_img->SizeInPixels());
+ TRect fsRect = TRect(fsPostion,Size());
fsRect = TRect(fsRect.iTl - TPoint(KFullScreenButtonOffset,KFullScreenButtonOffset), fsRect.iBr);
TPoint pointerPosition = fsPostion + aPointerEvent.iPosition;
if( fsRect.Contains(pointerPosition))
--- a/webengine/osswebengine/WebKit/s60/webview/WebPageFullScreenHandler.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPageFullScreenHandler.h Thu Aug 19 10:58:56 2010 +0300
@@ -61,6 +61,8 @@
void ConstructL();
TPoint CalculatePosition();
+
+ TSize CalculateSize();
public: // New functions
--- a/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -404,7 +404,7 @@
if (shouldScrollVertically || shouldScrollHorizontally){
if (m_scrollableView.m_frameView->needScroll(scrollPos)) {
- frame->frameView()->scrollTo(scrollPos);
+ frame->frameView()->scrollTo(scrollPos, ETrue);
updateScrollbars(scrollPos, newscrollDelta);
core(frame)->sendScrollEvent();
}
@@ -431,8 +431,8 @@
m_currentNormalizedPosition.iY = m_scrollableView.contentPos().iY * 100;
}
else {
-
- m_scrollableView.m_frameView->scrollTo(scrollPos);
+
+ m_scrollableView.m_frameView->scrollTo(scrollPos, ETrue);
m_lastPosition = m_currentPosition;
#ifndef BRDO_USE_GESTURE_HELPER
m_decel->updatePos();
--- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -118,13 +118,16 @@
PluginSkin* plugin = pluginHandler->getVisiblePlugins()[i];
if (plugin && plugin->pluginWin() && plugin->pluginWin()->containsPoint(*m_webview,aGesture.CurrentPos())) {
if (plugin->pluginWin()->HandleGesture(aGesture)) {
- if(!plugin->isActive()) {
- plugin->activate();
- }
- else {
- m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox);
- m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame());
- m_webview->brCtl()->updateDefaultSoftkeys();
+ // Above call can end up in the deletion of the plugin, so check if the plugin is still alive
+ if (pluginHandler->getVisiblePlugins().Find(plugin) != KErrNotFound) {
+ if(!plugin->isActive()) {
+ plugin->activate();
+ }
+ else {
+ m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox);
+ m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame());
+ m_webview->brCtl()->updateDefaultSoftkeys();
+ }
}
return;
}
@@ -470,14 +473,13 @@
m_lastTapEvent.iType = TPointerEvent::EButton1Up;
m_lastTapEvent.iModifiers = 0;
- // don't pass the event if the text input is not in valid format
- if (m_webview->fepTextEditor()->validateTextFormat()) {
- if (!IS_NAVIGATION_NONE) {
- // in case of navigation none button down was sent in buttonDownTimerCB()
- m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
- }
- m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, coreFrame);
- }
+ m_webview->fepTextEditor()->validateTextFormat();
+
+ if (!IS_NAVIGATION_NONE) {
+ // in case of navigation none button down was sent in buttonDownTimerCB()
+ m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
+ }
+ m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, coreFrame);
// special handling for broken image (why is this here??)
if (elType == TBrCtlDefs::EElementBrokenImage) {
--- a/webengine/osswebengine/WebKit/s60/webview/WebScrollingDecelerator.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebScrollingDecelerator.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -170,7 +170,7 @@
m_normalizedCurrentPosition += m_scrolldelta;
newpos.iX = m_normalizedCurrentPosition.iX/100;
newpos.iY = m_normalizedCurrentPosition.iY/100;
- scrollingView->scrollTo(newpos);
+ scrollingView->scrollTo(newpos, ETrue);
if (scrollingView->vScrollbar()) {
scrollingView->vScrollbar()->setValue(newpos.iY);
--- a/webengine/osswebengine/WebKit/s60/webview/WebSurface.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebSurface.h Thu Aug 19 10:58:56 2010 +0300
@@ -31,11 +31,8 @@
class CBitmapContext;
class WebView;
-#ifdef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
-const TDisplayMode KDisplayMode = EColor64K;
-#else
+
const TDisplayMode KDisplayMode = EColor16MU;
-#endif
class WebSurface : public CBase
{
--- a/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -61,7 +61,7 @@
void WebTextFormatMask::buildMaskList(const String& str)
{
// *M or *m
- if (str.isEmpty() || str=="*M" || str=="*m") {
+ if (str.isEmpty() || str=="*m") {
m_acceptAll = true;
return;
}
@@ -221,17 +221,22 @@
int WebTextFormatMask::getMultitude()
{
+ int length = 0;
int count = 0;
MaskBase* m = m_masks;
while (m) {
-
- if (m->multitude() == kInfinite){
- return kInfinite;
- }
- else {
- count += m->multitude();
- }
- m = m->nextMask();
+ length = m->multitude();
+ if (length == kInfinite){
+ return kInfinite;
+ }
+ else if(length > 1){
+ count += length;
+ break;
+ }
+ else{
+ count += length;
+ }
+ m = m->nextMask();
}
return (count)?count:kInfinite;
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -101,6 +101,7 @@
#include "Editor.h"
#include "ThumbnailGenerator.h"
#include <kjs_window.h>
+#include "PluginHandler.h"
using namespace WebCore;
using namespace EventNames;
@@ -224,7 +225,8 @@
WebView::~WebView()
{
StaticObjectsContainer::instance()->webCursor()->stopTransparencyTimer();
-
+ if ( StaticObjectsContainer::instance()->webCursor()->getCursorWebView() == this)
+ StaticObjectsContainer::instance()->webCursor()->setCurrentView(NULL);
// the zoom handler is a client of WebView (also owned by
// WebView--a circular dependency) so it must be deleted before
// the WebView object is destroyed because in its destructor it
@@ -242,7 +244,7 @@
if (m_fastScrollTimer)
m_fastScrollTimer->Cancel();
delete m_fastScrollTimer;
-
+ delete m_webpointerEventHandler;
delete m_pinchZoomHandler;
delete m_repainttimer;
delete m_webfeptexteditor;
@@ -258,7 +260,7 @@
delete m_toolbar;
delete m_toolbarinterface;
delete m_widgetextension;
- delete m_webpointerEventHandler;
+
delete m_pageScrollHandler;
delete m_pluginplayer;
delete m_fepTimer;
@@ -533,7 +535,7 @@
WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
if (cursor) {
if (visible) {
- cursor->setCurrentView(*this);
+ cursor->setCurrentView(this);
//Reset the iFocusedElementType to be the same as before the second window is opened.
cursor->setPosition(m_savedCursorPosition);
cursor->updatePositionAndElemType(m_savedCursorPosition);
@@ -775,6 +777,11 @@
mainFrame()->frameView()->draw( *gc, mainFrame()->frameView()->visibleRect() );
CleanupStack::PopAndDestroy(2);
+
+ PluginHandler* pluginHandler = StaticObjectsContainer::instance()->pluginHandler();
+ if (!m_widgetextension->IsWidgetPublising() && pluginHandler && pluginHandler->getVisiblePlugins().Count() > 0) {
+ (snapshot).Reset();
+ }
}
@@ -785,6 +792,10 @@
void WebView::scheduleRepaint(
const TRect& rect )
{
+ // prevent frameViews to access members when topView is closing down.
+ if( m_isClosing )
+ return;
+
m_repaints.AddRect( rect );
if( m_widgetextension && m_widgetextension->IsWidgetPublising())
{
@@ -1935,9 +1946,12 @@
void WebView::clearOffScreenBitmap()
{
- if( !IsVisible() )
+ if ( (!IsVisible()) || ( StaticObjectsContainer::instance()->webSurface()->topView() != this ) )
return;
-
+ TSize bmSize = StaticObjectsContainer::instance()->webSurface()->offscreenBitmap()->SizeInPixels();
+ if (bmSize.iWidth != Rect().Width() || bmSize.iHeight != Rect().Height()) {
+ return;
+ }
m_webcorecontext->gc().Reset();
m_webcorecontext->gc().Clear();
}
@@ -3000,10 +3014,15 @@
void WebView::focusedElementChanged(Element* element)
{
+ if (!element || !element->document() ||!element->renderer()) return;
+
Frame* frame = element->document()->frame();
+ if(!frame || !kit(frame)) return;
+
WebFrameView* fv = kit(frame)->frameView();
+ if(!fv) return;
+
if (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed || m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone) {
- if (!element || !element->document() ||!element->renderer()) return;
if (element->hasTagName(textareaTag) || (element->hasTagName(inputTag) && (reinterpret_cast<HTMLInputElement*>(element))->isTextField())) {
TPoint point = TRect(element->getRect()).iTl;
point = fv->frameCoordsInViewCoords(point);
--- a/webengine/osswebengine/cache/inc/HttpCacheStreamHandler.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/cache/inc/HttpCacheStreamHandler.h Thu Aug 19 10:58:56 2010 +0300
@@ -164,6 +164,14 @@
* @return
*/
TBool FlushAsync( CHttpCacheEntry& aCacheEntry , TRequestStatus& aStatus);
+
+ /**
+ * CancelFlush
+ * @since 7.2
+ * @param
+ * @return
+ */
+ void CancelFlush(CHttpCacheEntry& aEntry);
/**
*
--- a/webengine/osswebengine/cache/src/HttpCacheFileWriteHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/cache/src/HttpCacheFileWriteHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -435,6 +435,8 @@
//
void CHttpCacheFileWriteHandler::DoCancel()
{
+ if(iObjectFlushing)
+ iCacheStreamHandler->CancelFlush(*iObjectFlushing);
}
// -----------------------------------------------------------------------------
--- a/webengine/osswebengine/cache/src/HttpCacheStreamHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/cache/src/HttpCacheStreamHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -478,6 +478,17 @@
}
// -----------------------------------------------------------------------------
+// CHttpCacheStreamHandler::CancelFlush
+//
+// -----------------------------------------------------------------------------
+//
+void CHttpCacheStreamHandler::CancelFlush(CHttpCacheEntry& aEntry)
+ {
+ aEntry.CancelBodyWrite();
+ }
+
+
+// -----------------------------------------------------------------------------
// CHttpCacheStreamHandler::FlushAsync
//
// -----------------------------------------------------------------------------
--- a/webengine/osswebengine/npscript/group/Bwinscw/npscriptu.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/npscript/group/Bwinscw/npscriptu.def Thu Aug 19 10:58:56 2010 +0300
@@ -17,4 +17,5 @@
NPN_RetainObject @ 16 NONAME
NPN_SetProperty @ 17 NONAME
NPN_UTF8FromIdentifier @ 18 NONAME
+ NPN_SetException @ 19 NONAME
--- a/webengine/osswebengine/npscript/group/EABI/npscriptu.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/npscript/group/EABI/npscriptu.def Thu Aug 19 10:58:56 2010 +0300
@@ -17,4 +17,5 @@
NPN_RetainObject @ 16 NONAME
NPN_SetProperty @ 17 NONAME
NPN_UTF8FromIdentifier @ 18 NONAME
+ NPN_SetException @ 19 NONAME
--- a/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/webkit/s60/webview/WebPagePinchZoomHandler.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -209,8 +209,6 @@
{
m_bitmapUpdateTimer->Cancel();
m_webView->restoreZoomLevel(m_webView->scalingFactor());
- //update the plugin rect after pinch zoom exit
- m_webView->mainFrame()->notifyPluginsOfPositionChange();
m_webView->startCheckerBoardDestroyTimer();
}
--- a/webengine/webkitutils/stmgesturefw/src/tapgesturerecogniser.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/webkitutils/stmgesturefw/src/tapgesturerecogniser.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -67,10 +67,10 @@
CTapGestureRecogniser::CTapGestureRecogniser(MGestureListener* aListener) :
CTimer(EPriorityRealTime - 1)
{
- m_powner = aListener->getOwner() ;
// if a listener is given here, then it is both tap and doubletap listener
if (aListener)
{
+ m_powner = aListener->getOwner() ;
addTapListener(aListener, m_powner) ;
addDoubleTapListener(aListener, m_powner) ;
}
--- a/webengine/widgetinstaller/Inc/WidgetInstaller.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/Inc/WidgetInstaller.h Thu Aug 19 10:58:56 2010 +0300
@@ -126,7 +126,11 @@
* @since 5.0
*/
IMPORT_C void DeregisterWidgetL( const TUid& aUid );
-
+
+ /**
+ * @since 5.0
+ */
+ IMPORT_C void DeregisterWidgetsL( const RArray<TUid>& aUidList);
private:
/**
--- a/webengine/widgetinstaller/Inc/WidgetRegistrationManager.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/Inc/WidgetRegistrationManager.h Thu Aug 19 10:58:56 2010 +0300
@@ -68,7 +68,14 @@
* @return void
*/
void DeregisterWidgetL( const TUid& aUid );
-
+
+ /**
+ * deregister installed widgets as non native app
+ * @since 3.1
+ * @param aUidList - the list of UID of widgets to be unisntalled
+ * @return void
+ */
+ void DeregisterWidgetsL( const RArray<TUid>& aUidList);
protected: // constructors
--- a/webengine/widgetinstaller/Src/WidgetInstaller.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/Src/WidgetInstaller.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -874,6 +874,11 @@
iAppManager->DeregisterWidgetL( aUid );
}
+EXPORT_C void CWidgetInstaller::DeregisterWidgetsL( const RArray<TUid>& aUidList)
+ {
+ iAppManager->DeregisterWidgetsL( aUidList );
+ }
+
// ============================================================================
// CWidgetInstaller::RunError()
// It is called by WidgetActiveCallback when InstallL leaves.
--- a/webengine/widgetinstaller/Src/WidgetRegistrationManager.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/Src/WidgetRegistrationManager.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -98,11 +98,31 @@
User::LeaveIfError( apparcSession.Connect() );
apparcSession.PrepareNonNativeApplicationsUpdatesL();
- apparcSession.DeregisterNonNativeApplicationL( aUid );
- apparcSession.DeregisterNonNativeApplicationTypeL( aUid );
+ apparcSession.DeregisterNonNativeApplicationL( aUid );
apparcSession.CommitNonNativeApplicationsUpdatesL();
apparcSession.Close();
}
+
+// ============================================================================
+// CWidgetRegistrationManager::DeregisterWidgetL()
+// Deregister installed widgets as non native app
+//
+// @since 5.1
+// ============================================================================
+//
+void CWidgetRegistrationManager::DeregisterWidgetsL( const RArray<TUid>& aUidList )
+ {
+ RApaLsSession apparcSession;
+ User::LeaveIfError( apparcSession.Connect() );
+
+ apparcSession.PrepareNonNativeApplicationsUpdatesL();
+ for(TInt i = 0;i<aUidList.Count();i++)
+ {
+ apparcSession.DeregisterNonNativeApplicationL( aUidList[i] );
+ }
+ apparcSession.CommitNonNativeApplicationsUpdatesL();
+ apparcSession.Close();
+ }
// ============================================================================
// CWidgetRegistrationManager::RegisterWidgetL()
--- a/webengine/widgetinstaller/bwins/WidgetInstalleru.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/bwins/WidgetInstalleru.def Thu Aug 19 10:58:56 2010 +0300
@@ -7,4 +7,5 @@
?RenameIconFile@CWidgetInstaller@@QAEHAAVRFs@@PAV?$RPointerArray@VCWidgetPropertyValue@@@@@Z @ 6 NONAME ; int CWidgetInstaller::RenameIconFile(class RFs &, class RPointerArray<class CWidgetPropertyValue> *)
?RunError@CWidgetInstaller@@QAEHH@Z @ 7 NONAME ; int CWidgetInstaller::RunError(int)
?WidgetPropertiesFromInstalledWidgetL@CWidgetInstaller@@QAEPAV?$RPointerArray@VCWidgetPropertyValue@@@@AAVRFs@@ABVTDesC16@@1VTUid@@@Z @ 8 NONAME ; class RPointerArray<class CWidgetPropertyValue> * CWidgetInstaller::WidgetPropertiesFromInstalledWidgetL(class RFs &, class TDesC16 const &, class TDesC16 const &, class TUid)
+ ?DeregisterWidgetsL@CWidgetInstaller@@QAEXABV?$RArray@VTUid@@@@@Z @ 9 NONAME ; void CWidgetInstaller::DeregisterWidgetsL(class RArray<class TUid> const &)
--- a/webengine/widgetinstaller/eabi/WidgetInstalleru.def Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetinstaller/eabi/WidgetInstalleru.def Thu Aug 19 10:58:56 2010 +0300
@@ -11,4 +11,5 @@
_ZTV14CIconConverter @ 10 NONAME ; #<VT>#
_ZTI24CWidgetBackupRegistryXml @ 11 NONAME ; #<TI>#
_ZTV24CWidgetBackupRegistryXml @ 12 NONAME ; #<VT>#
+ _ZN16CWidgetInstaller18DeregisterWidgetsLERK6RArrayI4TUidE @ 13 NONAME
--- a/webengine/widgetregistry/Server/src/WidgetRegistry.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/widgetregistry/Server/src/WidgetRegistry.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -2084,7 +2084,7 @@
if ( !((aInstalledListForDriveFlags)[i] & EInstallListFlagEntry ))
{
TEntry dirEntry = (*aInstalledListForDrive)[i];
- if ( 0 == bundleIdentifier.Compare( dirEntry.iName ) )
+ if ( 0 == bundleIdentifier.CompareF( dirEntry.iName ) )
{
(aInstalledListForDriveFlags)[i] |= EInstallListFlagEntry;
result = ETrue;
@@ -2347,7 +2347,9 @@
void CWidgetRegistry::AppArchListConsistency( const RArray<TUid>& aAppArchList,
RArray<TInt>& aAppArchListFlags )
{
- LOG( "AppArchListConsistency" );
+ LOG( "AppArchListConsistency" );
+ RArray<TUid> deRegisterList( KDefaultWidgetCount );
+ CleanupClosePushL(deRegisterList);
for ( TInt i = 0; i < aAppArchList.Count(); i++ )
{
if ( !( aAppArchListFlags[i] & EAppListFlagEntry ) )
@@ -2355,9 +2357,14 @@
LOG_CODE( TInt uidIntLog = aAppArchList[i].iUid );
LOG2( " deregistered widget 0x%x (%d)",
uidIntLog, uidIntLog );
- TRAP_IGNORE( iInstaller->DeregisterWidgetL( aAppArchList[i] ) );
+ deRegisterList.Append(aAppArchList[i]);
}
}
+ if(deRegisterList.Count())
+ {
+ TRAP_IGNORE( iInstaller->DeregisterWidgetsL( deRegisterList ) );
+ }
+ CleanupStack::PopAndDestroy(&deRegisterList);
LOG( "AppArchListConsistency done" );
}
--- a/webengine/wmlengine/src/MVC/include/MVCView.h Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wmlengine/src/MVC/include/MVCView.h Thu Aug 19 10:58:56 2010 +0300
@@ -442,6 +442,8 @@
TBrowserStatusCode UpdateScrollBars () const;
void GetParentBox(NW_LMgr_Box_t* parentBox, NW_LMgr_Box_t** pReturnedParentBox);
+ void CancelPeriodicTimer();
+ static TInt PeriodicTimerCallBack(TAny* aAny);
private:
CBitmapContext* iBitmapContext;
CBitmapDevice* iBitmapDevice;
@@ -506,6 +508,7 @@
CWmlControl* iWmlControl;
TBool iShouldActivate;
TBool iDrag;
+ CPeriodic* iPeriodicTimer;
};
#endif // EPOC32VIEW_H
--- a/webengine/wmlengine/src/MVC/src/MVCView.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wmlengine/src/MVC/src/MVCView.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -137,7 +137,8 @@
#endif /* DEBUG */
#endif /* WINS */
-
+//CONSTANT
+const TInt KPeriodicTimerStartInterval2Sec(750000);
// ============================= PRIVATE FUNCTIONS ===============================
NW_Bool
CView::ProcessFontSizeChangeEvent ()
@@ -1907,6 +1908,8 @@
EnableDragEvents();
}
+ iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityHigh);
+
ActivateL();
}
@@ -1929,6 +1932,12 @@
// Destructor
CView::~CView()
{
+ if(iPeriodicTimer)
+ {
+ // Calling Cancel without checking if the timer is active is safe
+ iPeriodicTimer->Cancel();
+ delete iPeriodicTimer;
+ }
// remove observer
//CBrowserSettings::Instance()->RemoveObserver();
@@ -4320,6 +4329,14 @@
{
if((!iDrag))
{
+ if(!iPeriodicTimer->IsActive() )
+ {
+ iPeriodicTimer->Start(KPeriodicTimerStartInterval2Sec, NULL, TCallBack(PeriodicTimerCallBack, this));
+ }
+ else
+ {
+ continue;
+ }
NW_Evt_ActivateEvent_t actEvent;
NW_Evt_ActivateEvent_Initialize (&actEvent);
ProcessEvent (NW_Evt_EventOf(&actEvent));
@@ -5580,5 +5597,16 @@
Draw(NW_TRUE);
}
-
+void CView::CancelPeriodicTimer()
+ {
+ if(iPeriodicTimer)
+ iPeriodicTimer->Cancel();
+ }
+
+TInt CView::PeriodicTimerCallBack(TAny* aAny)
+ {
+ CView* self = static_cast<CView*>( aAny );
+ self->CancelPeriodicTimer();
+ return KErrNone;
+ }
// ============================ MEMBER FUNCTIONS ===============================
--- a/webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wmlengine/src/fbox/src/Epoc32InputSkin.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -790,14 +790,6 @@
thisObj->cppEpoc32InputBox->ActivateVKB();
}
- // also try to launch async in case dialog is up
- if (thisObj->vkbTimer == NULL)
- {
- thisObj->vkbTimer = NW_System_Timer_New (NW_FBox_InputSkin_VKBCallback,
- thisObj, 4000, NW_FALSE);
- }
-
-
return KBrsrSuccess;
}
--- a/webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wmlengine/src/fbox/src/FBOXWmlFormattedEditor.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -1183,7 +1183,6 @@
;
}
- SetCursorPosL( 0 );
iText->Reset();
CEikRichTextEditor::SetTextL( iHandler->TextLC());
CleanupStack::PopAndDestroy(); // return value of iHandler->TextLC
--- a/webengine/wmlengine/src/hed/src/Loader.c Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wmlengine/src/hed/src/Loader.c Thu Aug 19 10:58:56 2010 +0300
@@ -680,6 +680,24 @@
(void)NW_HED_ILoaderListener_LoadProgressOn(thisObj->loaderListener, *transactionId);
NW_CATCH (status) {
+ NW_ADT_Vector_Metric_t numLoadQEntries,index;
+ NW_ADT_DynamicVector_t* loadQueue = NULL;
+ NW_HED_Loader_LoadQEntry_t* entry = NULL;
+ loadQueue = GetNW_HED_Loader_LoadQueue();
+ if (loadQueue == NULL)
+ {
+ return KBrsrNotFound;
+ }
+ numLoadQEntries = NW_ADT_Vector_GetSize (loadQueue);
+ for(index=0;index<numLoadQEntries;index++)
+ {
+ entry = (NW_HED_Loader_LoadQEntry_t*)NW_ADT_Vector_ElementAt(loadQueue,index);
+ if(entry && entry->clientData == context)
+ {
+ entry->clientData = NULL;
+ break;
+ }
+ }
NW_Mem_Free(context);
}
--- a/webengine/wrtharvester/src/wrtharvester.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wrtharvester/src/wrtharvester.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -335,7 +335,10 @@
}
return;
}
-
+
+ if(!iCanAccessRegistry)
+ return;
+
TWidgetOperations operation( Uninitialized );
if( aTrigger == KActive )
{
@@ -771,7 +774,10 @@
//Hack to find out if WidgetUi exist as Queue keeps filling up
SWidgetOperation op = { aOperation, aUid };
- if((iHSCount*3 <= iWidgetOperations.Count() && !CheckTaskExistsL() ) || (aOperation == WidgetSelect))
+ TInt value = KErrNone;
+ TInt error = iWidgetUIListener->GetValue(value);
+
+ if((iHSCount*3 <= iWidgetOperations.Count() && !CheckTaskExistsL() ) || (aOperation == WidgetSelect && !CheckTaskExistsL() && value ) )
{
ClearAllOperations();
iWidgetUIListener->SetValue(1);
@@ -831,13 +837,17 @@
{
TInt value = KErrNone;
TInt error = iWidgetUIListener->GetValue(value);
- if( error == KErrNone && value == 1 && iWidgetOperations.Count() != 0 )
+ if( error == KErrNone && value == 1 && iWidgetOperations.Count() != 0 && iCanAccessRegistry )
{
// Set value to 0 so that next widget is not launched before Widget App sets value to 1.
iWidgetUIListener->SetValue( 0 );
//Always launch the first in operation
LaunchWidgetOperationL( iWidgetOperations[0] );
- iWidgetOperations.Remove( 0 );
+
+ if(iWidgetOperations[0].iOperation == WidgetSelect)
+ ClearAllOperations();
+ else
+ iWidgetOperations.Remove( 0 );
}
}
--- a/webengine/wrtharvester/src/wrtharvesterregistryaccess.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/wrtharvester/src/wrtharvesterregistryaccess.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -66,11 +66,13 @@
IsNokiaWidget( session, widgetInfo->iUid ))
{
CWrtInfo* info = new CWrtInfo();
+ CleanupStack::PushL(info);
info->iUid = widgetInfo->iUid;
info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
info->iType = KS60Widget;
aWidgetInfoArray.AppendL( info );
+ CleanupStack::Pop(info);
}
}
CleanupStack::PopAndDestroy( &session );
--- a/widgets/widgetapp/group/WidgetUi.mmp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/group/WidgetUi.mmp Thu Aug 19 10:58:56 2010 +0300
@@ -33,7 +33,7 @@
//EPOCHEAPSIZE 0x5000 0x1000000
VENDORID VID_DEFAULT
-CAPABILITY CAP_APPLICATION NetworkControl
+CAPABILITY CAP_APPLICATION NetworkControl WriteDeviceData
EpocAllowDllData
@@ -65,6 +65,7 @@
SOURCE WidgetUiAsyncExit.cpp
SOURCE WidgetUiDialogsProviderProxy.cpp
SOURCE WidgetUiNetworkListener.cpp
+source WidgetUiPSNotifier.cpp
#ifdef BRDO_WRT_HS_FF
SOURCE cpspublisher.cpp
#endif
--- a/widgets/widgetapp/inc/WidgetUiObserver.h Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/inc/WidgetUiObserver.h Thu Aug 19 10:58:56 2010 +0300
@@ -318,6 +318,7 @@
//Active Object to collect bitmap
CIdle* iCollectBitmapTimer;
RFs iFs;
+ RFile iFile;
};
#endif // WIDGEUIOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/widgets/widgetapp/inc/WidgetUiPSNotifier.h Thu Aug 19 10:58:56 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2007 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: Publish&Subscribe event listener
+*
+*/
+
+#ifndef WIDGETUIPSNOTIFIER_H_
+#define WIDGETUIPSNOTIFIER_H_
+
+#include <e32base.h>
+#include <e32property.h>
+#include <flogger.h>
+#include <widgetregistryclient.h>
+#include <WidgetRegistryData.h>
+
+class CWidgetUiWindowManager;
+class CWidgetUiWindow;
+
+const TUid KMyPropertyCat = { 0x10282E5A };
+const TUid KPropertyWidgetUI = { 0x10282822 };
+enum TPropertyKeyValues {EWidgetRegAltered = 110, ESapiPrompt = 115, ESapiPromptCleared=116};
+enum TOperations {EIncrement = 1, EDecrement = -1};
+class CWidgetUiPSNotifier : public CActive
+ {
+ CWidgetUiPSNotifier(CWidgetUiWindowManager& aWindowManager, TPropertyKeyValues aKey);
+
+ void ConstructL();
+ void RunL();
+ void DoCancel();
+public:
+ static CWidgetUiPSNotifier* NewL(CWidgetUiWindowManager& aWindowManager , TPropertyKeyValues aKey);
+ ~CWidgetUiPSNotifier();
+ RProperty iProperty;
+ void UpdateWindowList();
+ void UpdateSapiPromptState();
+private:
+ CWidgetUiWindowManager& iWindowManager;
+ TPropertyKeyValues iKey;
+ };
+#endif
--- a/widgets/widgetapp/inc/WidgetUiWindow.h Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/inc/WidgetUiWindow.h Thu Aug 19 10:58:56 2010 +0300
@@ -515,12 +515,20 @@
static TInt DeleteItself(TAny* aPtr);
+ void DeleteItself();
+
#ifdef BRDO_OCC_ENABLED_FF
void CancelAllDialogs();
TBool IsDialogsLaunched();
#endif
+ void setSapiPromptCleared(TBool aPrompt){ iSapiPromptCleared = aPrompt; }
+ TBool getSapiPromptCleared(){ return iSapiPromptCleared; }
+ TInt getNeedToIgnoreSapiNtfn(){ return iNeedToIgnoreSapiNtfn; }
+ void setNeedToIgnoreSapiNtfn ( TInt aVal){ iNeedToIgnoreSapiNtfn = iNeedToIgnoreSapiNtfn + aVal;}
+ TInt getNeedToIgnoreSapiClearNtfn(){ return iNeedToIgnoreSapiClearNtfn;}
+ void setNeedToIgnoreSapiClearNtfn ( TInt aVal) { iNeedToIgnoreSapiClearNtfn = iNeedToIgnoreSapiClearNtfn + aVal;}
protected:
@@ -628,6 +636,10 @@
TBool iDeleteItself;
CAsyncCallBack* iAsyncCallBack;
CBrowserDialogsProvider* iDialogsProvider;// owned, responsible for deleting
+ // For sapi prmompt counts
+ TBool iSapiPromptCleared;
+ TInt iNeedToIgnoreSapiNtfn;
+ TInt iNeedToIgnoreSapiClearNtfn;
};
--- a/widgets/widgetapp/inc/WidgetUiWindowManager.h Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/inc/WidgetUiWindowManager.h Thu Aug 19 10:58:56 2010 +0300
@@ -54,6 +54,7 @@
class CInternetConnectionManager;
class CSchemeHandler;
class CWidgetUiNetworkListener;
+class CWidgetUiPSNotifier;
#ifdef BRDO_WRT_HS_FF
class CCpsPublisher;
@@ -293,7 +294,7 @@
* @param none
* @return CArrayPtrFlat<CWidgetUiWindow>*
*/
- void WindowList( RPointerArray<CWidgetUiWindow>& ) { /*return iWindowList; */ User::Invariant(); }
+ void WindowList( RPointerArray<CWidgetUiWindow>& aWindowList) { aWindowList = iWindowList; }
/**
* WidgetUIClientSession
@@ -647,7 +648,9 @@
TBool iNetworkConnected; // ETrue if there is an active network connection, else EFalse
TBrCtlDefs::TCursorSettings iWidgetCursorMode;
TBrCtlDefs::TEnterKeySettings iWidgetEnterKeyMode;
-
+ CWidgetUiPSNotifier* iWidgetNotifier;
+ CWidgetUiPSNotifier* iWidgetSapiNotifier;
+ CWidgetUiPSNotifier* iWidgetSapiClearNotifier;
#ifdef BRDO_WRT_HS_FF
CCpsPublisher* iCpsPublisher; // Owned, interface to publish bitmap to CPS
CCenrepNotifyHandler* iCenrepNotifyHandler;
--- a/widgets/widgetapp/src/WidgetUiObserver.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/src/WidgetUiObserver.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -52,6 +52,16 @@
_LIT( KPathChar, "\\" );
_LIT( KLprojExt, ".lproj" );
+
+_LIT( KJavaExtension, ".js");
+_LIT( KJavaMimeType, "application/x-javascript");
+_LIT( KCssExtension, ".css");
+_LIT( KCssMimeType,"text/css");
+_LIT( KPngExtension, ".png");
+_LIT( KPngMimeType, "image/png");
+_LIT( KGifExtension, ".gif");
+_LIT( KGifMimeType,"image/gif");
+
// MACROS
// LOCAL CONSTANTS AND MACROS
@@ -249,7 +259,7 @@
{ // For files in Public areas, don't use localized subdirectory
TranslateURLToFilenameL( aEmbeddedUrl, KNullDesC);
}
-
+
HBufC8* buf = ReadFileL( *iFileName);
if ( !buf && isSandboxed )
@@ -266,7 +276,56 @@
CleanupStack::PushL( buf );
HBufC* contentType = NULL;
TPtrC p( NULL, 0 );
- contentType = RecognizeLC( *iFileName );
+
+ // file extension check for .js, .css, .png & .gif
+ TInt err(0);
+ //.js
+ err = iFileName->FindF(KJavaExtension);
+ if(err != KErrNotFound)
+ {
+ //.js
+ contentType = HBufC::NewLC(KJavaMimeType().Length());
+ *contentType = KJavaMimeType;
+ }
+ else
+ {
+ //.css
+ err = iFileName->FindF(KCssExtension) ;
+ if(err != KErrNotFound)
+ {
+ contentType = HBufC::NewLC(KCssMimeType().Length());
+ *contentType = KCssMimeType;
+ }
+ else if (err == KErrNotFound)
+ {
+ //.png
+ err = iFileName->FindF(KPngExtension);
+ if(err != KErrNotFound)
+ {
+ //.png
+ contentType = HBufC::NewLC(KPngMimeType().Length());
+ *contentType = KPngMimeType;
+ }
+ else
+ {
+ //.gif
+ err = iFileName->FindF(KGifExtension) ;
+ if(err!=KErrNotFound)
+ {
+ contentType = HBufC::NewLC(KGifMimeType().Length());
+ *contentType = KGifMimeType;
+ }
+ }
+ }
+ }
+ if(err == KErrNotFound)
+ {
+ //Let's use existing iFile the handle to the opened file (no need to re-open it)
+ contentType = RecognizeLC( *iFileName);
+
+ }
+ iFile.Close();
+
aEmbeddedLinkContent.HandleResolveComplete( *contentType, p, buf );
CleanupStack::PopAndDestroy( 2, buf ); // contentType, buf
return ETrue;
@@ -413,54 +472,45 @@
return EFalse;
}
+//
// -----------------------------------------------------------------------------
-// CWidgetUiObserver::ReadFile
+// CWidgetUiObserver::ReadFileL
// -----------------------------------------------------------------------------
//
HBufC8* CWidgetUiObserver::ReadFileL( const TDesC& aFileName )
{
- RFile file;
-
- if (KErrNone != file.Open( CCoeEnv::Static()->FsSession(), aFileName, EFileRead ) )
+ if (KErrNone != iFile.Open(CCoeEnv::Static()->FsSession(), aFileName, EFileRead|EFileShareAny) )
{
return NULL;
}
- CleanupClosePushL( file );
-
TInt size;
- User::LeaveIfError( file.Size( size ) );
+ User::LeaveIfError( iFile.Size( size ) );
HBufC8* buf = HBufC8::NewLC( size );
TPtr8 bufPtr( buf->Des() );
- User::LeaveIfError( file.Read( bufPtr ) );
+ User::LeaveIfError( iFile.Read( bufPtr ) );
CleanupStack::Pop( buf );
- CleanupStack::PopAndDestroy( &file );
return buf;
}
-
+//
// -----------------------------------------------------------------------------
-// CWidgetUiObserver::RecognizeL
+// CWidgetUiObserver::RecognizeLC
// -----------------------------------------------------------------------------
//
-HBufC* CWidgetUiObserver::RecognizeLC( const TDesC& aFileName )
+HBufC* CWidgetUiObserver::RecognizeLC( const TDesC& aFileName)
{
TDataRecognitionResult dataType;
RApaLsSession apaSession;
TInt ret;
- RFile file;
- User::LeaveIfError( file.Open(CCoeEnv::Static()->FsSession(), aFileName, EFileRead|EFileShareAny) );
- CleanupClosePushL( file );
-
CleanupClosePushL(apaSession);
User::LeaveIfError( apaSession.Connect() );
// Ask the application architecture to find the file type
- ret = apaSession.RecognizeData( file, dataType );
+ ret = apaSession.RecognizeData( iFile, dataType );
apaSession.Close();
CleanupStack::PopAndDestroy(1, &apaSession);
- CleanupStack::PopAndDestroy( &file );
TPtrC8 mimeTypePtr = dataType.iDataType.Des8();
TInt len = mimeTypePtr.Length() + 1;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/widgets/widgetapp/src/WidgetUiPSNotifier.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2007 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:
+*
+*/
+
+#include "WidgetUiPSNotifier.h"
+#include "WidgetUiWindowManager.h"
+#include <widgetregistryclient.h>
+#include "WidgetUiWindow.h"
+#include "WidgetAppDefs.rh"
+#include <e32debug.h>
+CWidgetUiPSNotifier::CWidgetUiPSNotifier(CWidgetUiWindowManager& aWindowManager, TPropertyKeyValues aKey) :iWindowManager(aWindowManager), iKey(aKey), CActive( EPriorityNormal )
+ {
+ }
+CWidgetUiPSNotifier::~CWidgetUiPSNotifier()
+ {
+ Cancel();
+ iProperty.Close();
+ }
+
+CWidgetUiPSNotifier* CWidgetUiPSNotifier::NewL(CWidgetUiWindowManager& aWindowManager, TPropertyKeyValues aKey )
+ {
+ CWidgetUiPSNotifier* self = new (ELeave) CWidgetUiPSNotifier(aWindowManager, aKey);
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+void CWidgetUiPSNotifier::ConstructL()
+ {
+ CActiveScheduler::Add(this);
+ TInt r(KErrNone);
+
+ if ( iKey != EWidgetRegAltered)
+ {
+ r = RProperty::Define( KPropertyWidgetUI, iKey, RProperty::EInt );
+ if ( r != KErrAlreadyExists && r != KErrNone )
+ {
+ User::LeaveIfError( r );
+ }
+ User::LeaveIfError( iProperty.Attach( KPropertyWidgetUI,iKey));
+ }
+ // Attach the key
+
+ if ( iKey == EWidgetRegAltered )
+ User::LeaveIfError( iProperty.Attach( KMyPropertyCat,iKey));
+ // initial subscription
+ iProperty.Subscribe( iStatus );
+ SetActive();
+ }
+
+
+// ---------------------------------------------------------------------------
+// CWrtHarvesterPSNotifier::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CWidgetUiPSNotifier::DoCancel()
+ {
+ iProperty.Cancel();
+ }
+
+// ---------------------------------------------------------------------------
+// CWidgetUiPSNotifier::RunL()
+// ---------------------------------------------------------------------------
+//
+void CWidgetUiPSNotifier::RunL()
+ {
+
+ // resubscribe before processing new value to prevent missing updates
+ iProperty.Subscribe( iStatus );
+ SetActive();
+
+ if (iKey == EWidgetRegAltered)
+ {
+ UpdateWindowList();
+ }
+ else if( iKey == ESapiPrompt || iKey == ESapiPromptCleared)
+ {
+ UpdateSapiPromptState();
+ }
+
+ }
+// ---------------------------------------------------------------------------
+// CWrtHarvesterPSNotifier::UpdateSapiPromptState
+// ---------------------------------------------------------------------------
+//
+void CWidgetUiPSNotifier::UpdateSapiPromptState()
+ {
+ TInt value( 0 );
+ iProperty.Get( value );
+
+ if( value != 0)
+ {
+ RPointerArray<CWidgetUiWindow> windowList;
+ iWindowManager.WindowList( windowList );
+ for(TInt i=windowList.Count()-1;i>=0;i--)
+ {
+ if( value == windowList[i]->Uid().iUid)
+ {
+ if(iKey == ESapiPrompt )
+ {
+ if( !windowList[i]->getSapiPromptCleared() )
+ windowList[i]->setNeedToIgnoreSapiClearNtfn(EIncrement);
+ else if( windowList[i]->getNeedToIgnoreSapiNtfn() == 0)
+ windowList[i]->setSapiPromptCleared(EFalse);
+ else if(windowList[i]->getNeedToIgnoreSapiNtfn() > 0 )
+ windowList[i]->setNeedToIgnoreSapiNtfn(EDecrement);
+
+ }
+ else if(iKey == ESapiPromptCleared )
+ {
+ if( windowList[i]->getSapiPromptCleared() )
+ windowList[i]->setNeedToIgnoreSapiNtfn(EIncrement);
+ else if ( windowList[i]->getNeedToIgnoreSapiClearNtfn() == 0)
+ windowList[i]->setSapiPromptCleared(ETrue);
+ else if(windowList[i]->getNeedToIgnoreSapiClearNtfn() > 0)
+ windowList[i]->setNeedToIgnoreSapiClearNtfn(EDecrement);
+ }
+ break;
+ }
+ }
+ }
+
+ }
+// ---------------------------------------------------------------------------
+// CWrtHarvesterPSNotifier::UpdateWindowList
+// ---------------------------------------------------------------------------
+//
+void CWidgetUiPSNotifier::UpdateWindowList()
+ {
+ RPointerArray<CWidgetUiWindow> iWindowList;
+ RWidgetRegistryClientSession iClientSession;
+ RPointerArray<CWidgetInfo> iWidgetInfoArray;
+
+ iWindowManager.WindowList( iWindowList );
+ User::LeaveIfError( iClientSession.Connect());
+ iClientSession.InstalledWidgetsL(iWidgetInfoArray);
+ TInt j=0;
+ for(TInt i=iWindowList.Count()-1;i>=0;i--){
+ for(j=0;j<iWidgetInfoArray.Count();j++) {
+ if( iWindowList[i]->Uid().iUid == iWidgetInfoArray[j]->iUid.iUid )
+ {
+ break;
+ }
+ }
+ //present.... so break, go to the next element in iWindowList array
+ if (j == iWidgetInfoArray.Count())
+ iWindowManager.HandleWidgetCommandL(iWindowList[i]->Uid(), Deactivate);
+
+ }
+ }
+
--- a/widgets/widgetapp/src/WidgetUiWindow.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindow.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -99,7 +99,8 @@
iPreferredOrientation(TBrCtlDefs::EOrientationUndefined),
iIsCurrent(EFalse), iShowSoftkeys(EFalse), iWidgetLoaded(EFalse),
iSchemeProcessing (EFalse), iNetworkState(ENetworkNotAllowed), iUserPermission(ETrue),
- iClickCount(0), iWidgetLoadStarted(EFalse)
+ iClickCount(0), iWidgetLoadStarted(EFalse), iSapiPromptCleared(ETrue),iNeedToIgnoreSapiNtfn(0),
+ iNeedToIgnoreSapiClearNtfn(0)
{
}
@@ -203,7 +204,7 @@
iNeedToNotifyNetworkState = EFalse;
// determine initial widget online/offline network state
DetermineNetworkState();
- iAsyncCallBack = new (ELeave) CAsyncCallBack(TCallBack(DeleteItself,this),CActive::EPriorityUserInput);
+ iAsyncCallBack = new (ELeave) CAsyncCallBack(TCallBack(DeleteItself,this),CActive::EPriorityLow);
}
// -----------------------------------------------------------------------------
@@ -1303,6 +1304,12 @@
return !iConnecting;
}
+
+void CWidgetUiWindow::DeleteItself()
+ {
+ iAsyncCallBack->CallBack();
+ }
+
// -----------------------------------------------------------------------------
// CWidgetUiWindow::DeleteItself()
// -----------------------------------------------------------------------------
@@ -1311,6 +1318,12 @@
{
CWidgetUiWindow* self = (CWidgetUiWindow*)aPtr;
CWidgetUiWindowManager* p = &self->iWindowManager;
+ //if sync request start another event loop
+ if(self->Engine()->IsSynchRequestPending())
+ {
+ self->DeleteItself();
+ return KErrNone;
+ }
delete self;
//The Correct fix is to call AppUI::Exit()
//But that is leaving
--- a/widgets/widgetapp/src/WidgetUiWindowContainer.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindowContainer.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -282,6 +282,12 @@
return EKeyWasConsumed;
}
+ //Ignore application keys(EKeyApplication0-EKeyApplication1F)
+ if( (aKeyEvent.iCode>=EKeyApplication0 && aKeyEvent.iCode<= EKeyApplicationF) ||
+ (aKeyEvent.iCode>=EKeyApplication10 && aKeyEvent.iCode<= EKeyApplication1F) )
+ {
+ return EKeyWasNotConsumed;
+ }
TKeyResponse resp(EKeyWasNotConsumed);
TBool editing(EFalse);
//Reset the iIsOptionsMenuActivated if enabled
--- a/widgets/widgetapp/src/WidgetUiWindowManager.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindowManager.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -26,6 +26,7 @@
#include "SWInstWidgetUid.h"
#include "widgetappdefs.rh"
#include "browser_platform_variant.hrh"
+#include "WidgetUiPSNotifier.h"
#ifdef BRDO_WRT_HS_FF
#include "cpspublisher.h"
#endif
@@ -197,6 +198,14 @@
iConnStageNotifier->SetPriority(CActive::EPriorityHigh);
iRetryConnectivity = CPeriodic::NewL(CActive::EPriorityStandard);
#endif
+
+ //Creating observer WidgetWindowsObeserver
+ iWidgetNotifier = CWidgetUiPSNotifier::NewL(*this, EWidgetRegAltered);
+
+#ifdef BRDO_SAPINTFN_ENABLED_FF
+ iWidgetSapiNotifier = CWidgetUiPSNotifier::NewL(*this, ESapiPrompt);
+ iWidgetSapiClearNotifier = CWidgetUiPSNotifier::NewL(*this, ESapiPromptCleared);
+#endif
}
// -----------------------------------------------------------------------------
@@ -266,6 +275,12 @@
delete iCpsPublisher;
#endif
delete iDb;
+ delete iWidgetNotifier;
+
+#ifdef BRDO_SAPINTFN_ENABLED_FF
+ delete iWidgetSapiNotifier;
+ delete iWidgetSapiClearNotifier;
+#endif
}
// -----------------------------------------------------------------------------
@@ -474,8 +489,13 @@
}
iActiveFsWindow->SetCurrentWindow( ETrue );
- }else
- Exit( EEikCmdExit, aUid );
+ }
+ else if (window->getSapiPromptCleared())
+ {
+ Exit( EEikCmdExit, aUid );
+ }
+
+
#else
Exit( EEikCmdExit, aUid );
#endif
@@ -764,7 +784,13 @@
#endif
iConnection->StopConnectionL();
}
- delete aWidgetWindow;
+ if(!aWidgetWindow->Engine()->IsSynchRequestPending())
+ delete aWidgetWindow;
+ else
+ {
+ //Let sync request complete and then delete
+ aWidgetWindow->DeleteItself();
+ }
}
}
return EFalse;
@@ -1423,6 +1449,13 @@
TBool bAllWindowsClosed = ETrue;
TInt nWidgetsCount = iWindowList.Count();
+ if(nWidgetsCount > 0)
+ {
+ CWidgetUiWindow* window = iWindowList[0];
+ TRAP_IGNORE( window->Engine()->HandleCommandL(
+ (TInt)TBrCtlDefs::ECommandIdBase +
+ (TInt)TBrCtlDefs::ECommandOOMExit ) );
+ }
for ( TInt i = (nWidgetsCount-1); i >= 0; i-- )
{
CWidgetUiWindow* window = iWindowList[i];
@@ -1586,6 +1619,12 @@
{
TRAP_IGNORE( err = iConnection->StartConnectionL( ETrue ) );
}
+
+ //Root cause needs to be identified..
+ //Fix for Array out of bound crash..
+ if(!iWindowList.Count())
+ return err;
+
CWidgetUiWindow* window( iWindowList[0] );
if( err == KErrNone )
{
--- a/widgets/widgetapp/src/cpspublisher.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/widgets/widgetapp/src/cpspublisher.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -671,6 +671,11 @@
{
CLiwGenericParamList& inparam = iServiceHandler->InParamListL();
CLiwGenericParamList& outparam = iServiceHandler->OutParamListL();
+
+ TLiwGenericParam cptype( KType, TLiwVariant( KCpData ));
+ cptype.PushL();
+
+ inparam.AppendL( cptype );
CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
@@ -688,6 +693,7 @@
CleanupStack::PopAndDestroy( &item );
CleanupStack::PopAndDestroy( cpdatamap );
+ CleanupStack::PopAndDestroy( &cptype );
outparam.Reset();
inparam.Reset();