Revision: 201034 RCL_3 PDK_3.0.3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 23:23:58 +0300
branchRCL_3
changeset 50 d96eed154187
parent 49 919f36ff910f
Revision: 201034 Kit: 201035
browserutilities/downloadmgr/DownloadMgrServEng/Inc/BuffStorage.h
browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp
browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp
browserutilities/webutils/conf/webutils.confml
web_pub/browser_control_api/inc/BrCtlDefs.h
webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp
webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp
webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.h
webengine/osswebengine/WebCore/rendering/RenderBox.cpp
webengine/osswebengine/WebCore/rendering/RenderText.cpp
webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp
webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp
webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp
webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp
webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp
webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h
webengine/osswebengine/WebKit/s60/webview/WebView.cpp
webengine/webkitutils/HistoryProvider/HistoryController.cpp
webengine/widgetregistry/Data/Widget_lproj.xml
webengine/widgetregistry/Server/src/WidgetRegistry.cpp
webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Inc/BuffStorage.h	Wed Sep 01 12:28:30 2010 +0100
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Inc/BuffStorage.h	Tue Sep 14 23:23:58 2010 +0300
@@ -43,7 +43,7 @@
 */
 
 
-NONSHARABLE_CLASS( CBuffStorage ) : public CActive
+NONSHARABLE_CLASS( CBuffStorage ) : public CBase
     {
     public:  // Constructors and destructor
     
@@ -102,26 +102,6 @@
     
     private: // From CActive
 
-    /**
-    * Cancels the timer.
-    * @param 
-    * @return
-    */
-    void DoCancel();
-    
-    /**
-    * Handles an active object’s request completion event.
-    * @param 
-    * @return
-    */
-    void RunL();
-    
-    /**
-    * Persist received chunk
-    * @since Series 60 v2.8
-    * @param aBuf new chunk to be added
-    * @return EFalse if content-length had to be updated.
-    */
     void DoBufferingWriteL(const TDesC8& aBuf);
     void DoNonbufferingWriteL(const TDesC8& aBuf);
     
@@ -154,7 +134,6 @@
     
     // For stalling condition handling
     TInt iLastWriteErrorCode;
-    CActiveSchedulerWait* iWait;
     
     // References to CHttpStorage data
     RFile*& iFile;
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -56,8 +56,7 @@
 // ---------------------------------------------------------
 //
 CBuffStorage::CBuffStorage( CHttpStorage* aHttpStorage )
-:CActive( EPriorityHigh ), 
- iFile(aHttpStorage->iFile),
+:iFile(aHttpStorage->iFile),
  iDownloadedSize(aHttpStorage->iDownloadedSize), 
  iBufferedSize(aHttpStorage->iBufferedSize),
  iHttpStorageBufferSize(aHttpStorage->iBufferSize),
@@ -77,9 +76,6 @@
 //
 void CBuffStorage::ConstructL()
     {
-    LOGGER_ENTERFN( "ConstructL" );
-    CActiveScheduler::Add( this );
-    iWait = new (ELeave) CActiveSchedulerWait;
     }
 
 // -----------------------------------------------------------------------------
@@ -104,56 +100,13 @@
 //
 CBuffStorage::~CBuffStorage()
     {
-    Cancel();
-
 	ResetBuffers();
 	
 	delete iWritePtr; iWritePtr = 0;
-	if(iWait)
-	    {
-	     delete iWait;
-	     iWait = NULL;
-	    }
     }
 
 
 
-// ---------------------------------------------------------
-// CBuffStorage::RunL
-// ---------------------------------------------------------
-//
-void CBuffStorage::RunL()
-    {
-    LOGGER_ENTERFN( "RunL" );
-    // Save the error code
-    iLastWriteErrorCode = iStatus.Int();
-   	
-    if(iLastWriteErrorCode==KErrNone && iWritePtr)
-    	{
-    	// Update how much was written on the file
-    	iDownloadedSize += iWritePtr->Length();
-    	
-    	CLOG_WRITE_2( "(%08X) CBuffStorage::RunL: Async write finished, downloaded now: %d", this, iDownloadedSize);
-    	}
-    else
-    	{
-    	CLOG_WRITE_2( "(%08X) CBuffStorage::RunL DH-iStat: %d, ", this, iStatus.Int() );
-    	}
-    	
-    if(iWait && iWait->IsStarted())
-		{
-		CLOG_WRITE_1 ( "(%08X) CBuffStorage::RunL() Stopping iWait", this );
-		iWait->AsyncStop();
-		}
-    }
-
-void CBuffStorage::DoCancel()
-	{
-	CLOG_WRITE_1("(%08X) CBuffStorage::DoCancel", this);
-	
-	// This is ok, CActive::Cancel always waits for the async operation to finish in this case
-	iLastWriteErrorCode = KErrCancel;
-	}
 
 // ---------------------------------------------------------
 // CBuffStorage::ResetBuffer
@@ -162,13 +115,6 @@
 void CBuffStorage::ResetBuffers()
 	{	
 	CLOG_WRITE_1("(%08X) CBuffStorage::ResetBuffers >>", this);
-	
-	if(IsActive()&& iWait && !iWait->IsStarted())
-		{
-		// Make sure async writes are finished
-		iWait->Start();
-		}
-	
 	// Cleanup
     delete iBuff1; iBuff1 = NULL;
     delete iBuff2; iBuff2 = NULL;
@@ -231,12 +177,6 @@
 	CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL >>", this);
 	
 	// Make sure async writes are finished before doing anything
-	if(IsActive() && iWait && !iWait->IsStarted())
-		{
-		CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling >>", this);
-	 	iWait->Start();
-	 	CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling <<", this);
-		}
 	
 	if(iLastWriteErrorCode != KErrNone)
 		{
@@ -338,15 +278,6 @@
 		src+=toFillUp;
 	    
 	    // Now we have a full client buffer, better do something with it
-	    
-	    // 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()&& iWait && !iWait->IsStarted())
-			{
-			CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling >>", this);
-		 	iWait->Start();
-		 	CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling <<", this);
-			}
 		
 		// In case of async writes we have to check if there was error previously
 		if(iLastWriteErrorCode != KErrNone)
@@ -393,10 +324,9 @@
 #endif
 
 		// Start the async write and set AO active
-	 	iFile->Write( *iWritePtr, iStatus ) ;
-	 	SetActive();
-	 	
-	 	// Swap buffer pointers (we can't use the same buffer here 
+        iFile->Write( *iWritePtr ) ;
+        iDownloadedSize += iWritePtr->Length();
+        // Swap buffer pointers (we can't use the same buffer here 
 	 	// since it is not known when the buffer can be used again)
 	 	if(iClientBuffer == iBuff1)
 	 		{
@@ -420,13 +350,6 @@
 void CBuffStorage::DoNonbufferingWriteL(const TDesC8& aBuf)
 	{
 	CLOG_WRITE_2("(%08X) CBuffStorage::DoNonbufferingWriteL: %d bytes", this, aBuf.Length());
-	
-	if(IsActive() && iWait && !iWait->IsStarted())
-		{
-		CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling >>", this);
-		iWait->Start();
-		CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling <<", this);
-		}
 		
 	TInt len = aBuf.Length();
 	if(len)
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpConnHandler.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -52,7 +52,7 @@
 
 // CONSTANTS
 const TInt KShutDownTimer = 60*1000000;  //60 sec - Updated to 60 secs as part of error fix JSIN-7JSE6H
-
+const TInt KCommBufferSize = 48 * 1024;
 // MACROS
 //#define ?macro ?macro_def
 
@@ -945,7 +945,10 @@
     connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketServ, 
                                     RHTTPSession::GetTable()), 
                             THTTPHdrVal (iClientApp->Engine()->SocketServ().Handle()) );
-    
+    // Set receive buffer size to 48 KB
+    connInfo.SetPropertyL(strPool.StringF(HTTP::ERecvBufferSize,
+             RHTTPSession::GetTable()), THTTPHdrVal(KCommBufferSize));
+
     TInt connPtr1 = REINTERPRET_CAST(TInt, &iConnection);
     connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketConnection, 
                             RHTTPSession::GetTable() ), THTTPHdrVal (connPtr1) );    
Binary file browserutilities/webutils/conf/webutils.confml has changed
--- a/web_pub/browser_control_api/inc/BrCtlDefs.h	Wed Sep 01 12:28:30 2010 +0100
+++ b/web_pub/browser_control_api/inc/BrCtlDefs.h	Tue Sep 14 23:23:58 2010 +0300
@@ -664,7 +664,8 @@
             EElementSmartLinkEmail, ///< an email address in the page.
             EElementBrokenImage, ///< A missing image
             EElementSmartLinkVoip, ///< A voip smartlink
-            EElementSelectMultiBox ///< A select box with multiple select
+            EElementSelectMultiBox, ///< A select box with multiple select
+            EElementdivTag ///< An editable div tag
         };
 
         /**
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpConnection.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -426,6 +426,16 @@
                 complete(KBrowserHTTPStatusCodes - m_transaction->Response().StatusCode());
                 return;
                 }
+            else if(httpStatus == EHttpForbidden)
+                {
+                complete(KBrowserHTTPStatusCodes - m_transaction->Response().StatusCode());
+                return; 
+                }
+            else if(httpStatus == EHttpInternalServerError)
+                {
+                complete(KBrowserHTTPStatusCodes - m_transaction->Response().StatusCode());
+                return; 
+                }
             if ( !handled )
                 {
                 // url
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -120,16 +120,20 @@
             //Property exists
             THTTPHdrVal setValue(SOCKET_LINGERING_TIMEOUT);
             connInfo.SetPropertyL ( strP.StringF( HTTP::EHttpEnableOptimalPipelining + 3, stringTable ), setValue );
+            RStringF maxConnection = strP.StringF( HTTP::EMaxNumTransportHandlers , stringTable );
+            connInfo.SetPropertyL( maxConnection, THTTPHdrVal( KHttpSushiMaxConnectionNum ) );
             }
         else 
             {
             // set shutdown
             THTTPHdrVal immediateShutdown = strP.StringF( HTTP::ESocketShutdownImmediate, stringTable );
             connInfo.SetPropertyL ( strP.StringF( HTTP::ESocketShutdownMode, stringTable ), immediateShutdown );
+            RStringF maxConnection = strP.StringF( HTTP::EMaxNumTransportHandlers , stringTable );
+            connInfo.SetPropertyL( maxConnection, THTTPHdrVal( KHttpMaxConnectionNum ) );
             }
         // set pipelining
-        RStringF maxConnection = strP.StringF( HTTP::EMaxNumTransportHandlers , stringTable );
-        connInfo.SetPropertyL( maxConnection, THTTPHdrVal( KHttpMaxConnectionNum ) );
+        //RStringF maxConnection = strP.StringF( HTTP::EMaxNumTransportHandlers , stringTable );
+        //connInfo.SetPropertyL( maxConnection, THTTPHdrVal( KHttpMaxConnectionNum ) );
 
         RStringF maxToPipeline = strP.StringF(HTTP::EMaxNumTransactionsToPipeline, stringTable );
         connInfo.SetPropertyL( maxToPipeline, THTTPHdrVal( KHttpMaxTransactionNumPerConnection ) );
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.h	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.h	Tue Sep 14 23:23:58 2010 +0300
@@ -43,6 +43,7 @@
 class SelfDownloadContentHandler;
 
 const int KHttpMaxConnectionNum = 7;
+const int KHttpSushiMaxConnectionNum = 8;
 const int KHttpMaxTransactionNumPerConnection = 2;
 const int KHttpBatchingBuffSize = 2*1400;
 const int KHttpReceiveBuffSize = 32*1024;
--- a/webengine/osswebengine/WebCore/rendering/RenderBox.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebCore/rendering/RenderBox.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -1456,9 +1456,11 @@
             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();
+                int h = size.height();
+                if (size.width() && (style()->width().isFixed() || style()->width().isPercent()))
+                    h = calcReplacedWidth() * size.height() / size.width();
                 if (h > 0)
-                    return calcContentBoxHeight(h);
+                return calcContentBoxHeight(h);
             }
 
             int availableHeight = isPositioned() ? containingBlockHeightForPositioned(cb) : cb->availableHeight();
--- a/webengine/osswebengine/WebCore/rendering/RenderText.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebCore/rendering/RenderText.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -932,8 +932,15 @@
                 	m_text = m_text->secure(bullet);
                 }
                 else{
-                    
-                    if(oldlength <= m_text->length())
+                    //Following condition takes care of the case where text control gets entire text in one
+                    //shot, not one character at a time. 
+                    //If control get entire input at a time then we will treat this as a auto fill up of password and will 
+                    // show all characters in bullet.
+                    if( oldlength != 0 && (oldlength - m_text->length()) == 0 ) 
+                    		{
+                            m_text = m_text->secure(bullet);
+                        }
+                    else if(oldlength <= m_text->length())
                         {
                         m_offset =  m_text->length() - 1 ;
                         m_text = m_text->secureShowOffset(bullet, m_offset);
--- a/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -149,12 +149,15 @@
         else
             elType = TBrCtlDefs::EElementNone;
     }
+    else if( e->hasLocalName(divTag)) {
+        elType = TBrCtlDefs::EElementdivTag;
+    }
 
     // change to activated input box
     WebView* v = control(frame)->webView();
     if ((elType == TBrCtlDefs::EElementInputBox) && v && v->isEditable())
-        elType = TBrCtlDefs::EElementActivatedInputBox;
-
+         elType = TBrCtlDefs::EElementActivatedInputBox;
+   
     return elType;
 }
 
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -592,6 +592,9 @@
 //
 void PluginWin::moveWindow(const TPoint& aOffset)
     {
+    WebView *view = control(m_pluginskin->frame())->webView();
+    if(!view || view->isClosing())
+        return;
     // set force scroll to true, when plugin gives move command, 
     // browser needs to move window according to offset value
     m_forceScroll = ETrue;
@@ -602,8 +605,7 @@
     WebCursor* c = StaticObjectsContainer::instance()->webCursor();
     if (c && mf && mf->frameView() && !m_pluginskin->pluginPlayer())
         {
-            // Offset sent by plugins doesn't take care of zoom level. Calculate currect offset value
-            WebView *view = control(m_pluginskin->frame())->webView();
+            // Offset sent by plugins doesn't take care of zoom level. Calculate currect offset value            
             TInt zoomlevel = view->zoomLevel();
 		    TPoint oldPos(mf->frameView()->contentPos());
 		    TPoint newPos ((aOffset.iX  * 100)/zoomlevel, (aOffset.iY  * 100)/zoomlevel);
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -95,15 +95,16 @@
 //-----------------------------------------------------------------------------
 bool WebEditorClient::shouldBeginEditing(WebCore::Range*)
 {
-    notImplemented();
-    return false;
+    return true;
 }
 
 //-----------------------------------------------------------------------------
 // WebEditorClient::shouldEndEditing
 //-----------------------------------------------------------------------------
-bool WebEditorClient::shouldEndEditing(WebCore::Range*)
+bool WebEditorClient::shouldEndEditing(WebCore::Range* range)
 {
+    if(range)
+        return true;
     return m_shouldEndEditing;
 }
 
@@ -382,7 +383,9 @@
                 m_webView->fepTextEditor()->HandleUpdateCursor();
                 if (frame->selectionController()->start() == startPos &&
                     frame->selectionController()->end() == endPos && !select) {
-                    m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused());
+                    m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() 
+                            || m_webView->fepTextEditor()->IsInputElementFocused()
+                            || m_webView->fepTextEditor()->IsDivElementFocused() );
                 }
                 else {
                     event->setDefaultHandled();
@@ -405,7 +408,9 @@
                 m_webView->fepTextEditor()->HandleUpdateCursor();
                 if (frame->selectionController()->start() == startPos &&
                     frame->selectionController()->end() == endPos && !select) {
-                    m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsInputElementFocused());
+                    m_shouldEndEditing = !(m_webView->fepTextEditor()->IsTextAreaFocused() 
+                            || m_webView->fepTextEditor()->IsInputElementFocused()
+                            || m_webView->fepTextEditor()->IsDivElementFocused());
                 }
                 else {
                     event->setDefaultHandled();
@@ -453,7 +458,7 @@
             case EKeyEnter:
             case EKeyDevice3:    
             	// If we are in a textarea, add a newline
-                if (m_webView->fepTextEditor()->IsTextAreaFocused()) {
+                if (m_webView->fepTextEditor()->IsTextAreaFocused() || m_webView->fepTextEditor()->IsDivElementFocused()) {
                     if (m_webView->fepTextEditor()->DocumentLengthForFep() <
                         m_webView->fepTextEditor()->DocumentMaximumLengthForFep()) {
                         frame->editor()->insertLineBreak();
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -1273,7 +1273,10 @@
     NSString *titleNSString = title;
     [[[WebHistory optionalSharedHistory] itemForURL:nsURL] setTitle:titleNSString];
     */
-    brctl(m_webFrame)->historyHandler()->setCurrentEntryTitle(title.des());    
+    HBufC* buf = core((brctl(m_webFrame)->webView()->mainFrame()))->loader()->documentLoader()->title().des().AllocL();
+    if(buf->Length())
+        brctl(m_webFrame)->historyHandler()->setCurrentEntryTitle(buf->Des());
+    delete buf;
 }
 
 String WebFrameLoaderClient::userAgent(const KURL&) 
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -47,7 +47,13 @@
 #include "PlatformKeyboardEvent.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
-
+#include "RenderStyle.h"
+#include "htmlediting.h"
+#include "HtmlDivElement.h"
+#include "CSSStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
+#include "SelectionController.h"
+#include "Selection.h"
 #include <coemain.h>
 #include <eikpanic.h>
 #include <aknedsts.h>
@@ -359,7 +365,7 @@
 // -----------------------------------------------------------------------------
 void CWebFepTextEditor::CancelFepInlineEdit()
 {
-    if (IsTextAreaFocused()||IsInputElementFocused()) {
+    if (IsTextAreaFocused()||IsInputElementFocused() || IsDivElementFocused()) {
         if (m_inlineEditText && DocumentLengthForFep() < DocumentMaximumLengthForFep()) {
             HBufC* tempBuf = HBufC::NewLC(DocumentLengthForFep());
             TPtr ptr(tempBuf->Des());
@@ -398,6 +404,11 @@
             HTMLTextAreaElement* ie = static_cast<HTMLTextAreaElement*>(frame->document()->focusedNode());
             length = ie->value().length();
         }
+        else if (frame->document()->focusedNode()->hasTagName(HTMLNames::divTag)) {
+            HTMLDivElement* ie = static_cast<HTMLDivElement*>(frame->document()->focusedNode());
+            length = ie->innerText().length();
+        }
+        
     }
 
     return length;
@@ -432,6 +443,83 @@
 }
 
 // -----------------------------------------------------------------------------
+// indexForVisiblePosition
+//
+//
+// -----------------------------------------------------------------------------
+TInt CWebFepTextEditor::indexForVisiblePosition(const WebCore::VisiblePosition& pos,WebCore::Element* node) const
+{
+    Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();    
+    Position indexPosition = pos.deepEquivalent();
+    if (!indexPosition.node() || indexPosition.node()->rootEditableElement() != node)
+        return 0;    
+    ExceptionCode ec = 0;
+    
+    RefPtr<Range> range = frame->document()->createRange(); 
+    range->setStart(node, 0, ec);
+    ASSERT(!ec);
+    range->setEnd(indexPosition.node(), indexPosition.offset(), ec);
+    
+    ASSERT(!ec);
+    return TextIterator::rangeLength(range.get());
+}
+
+// -----------------------------------------------------------------------------
+// visiblePositionForIndex
+//
+//
+// -----------------------------------------------------------------------------
+VisiblePosition CWebFepTextEditor::visiblePositionForIndex(TInt index,WebCore::Element* node)
+{
+    Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();    
+    if (index <= 0)
+        return VisiblePosition(node, 0, DOWNSTREAM);
+    ExceptionCode ec = 0;
+    
+    RefPtr<Range> range = frame->document()->createRange(); 
+    range->selectNodeContents(node, ec);
+    ASSERT(!ec);
+    CharacterIterator it(range.get());
+    it.advance(index - 1);
+    Node* endContainer = it.range()->endContainer(ec);
+    ASSERT(!ec);
+    int endOffset = it.range()->endOffset(ec);
+    ASSERT(!ec);
+    return VisiblePosition(endContainer, endOffset, UPSTREAM);
+}
+
+// -----------------------------------------------------------------------------
+// setSelectionRange
+//
+//
+// -----------------------------------------------------------------------------
+void CWebFepTextEditor::setSelectionRange(TInt start, TInt end, WebCore::Element* node)
+{
+    Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();    
+    end = Max(end, 0);
+    start = Min(Max(start, 0), end);
+
+    VisiblePosition startPosition = visiblePositionForIndex(start,node);
+    VisiblePosition endPosition;
+    if (start == end)
+        endPosition = startPosition;
+    else
+        endPosition = visiblePositionForIndex(end,node);
+
+    // startPosition and endPosition can be null position for example when
+    // "-webkit-user-select: none" style attribute is specified.
+    if (startPosition.isNotNull() && endPosition.isNotNull()) {
+        ASSERT(startPosition.deepEquivalent().node()->shadowAncestorNode() == node() && endPosition.deepEquivalent().node()->shadowAncestorNode() == node());
+    }
+    
+
+   if (frame)
+       { 
+        Selection newSelection = Selection(startPosition, endPosition);
+        frame->selectionController()->setSelection(newSelection);
+       } 
+}
+// -----------------------------------------------------------------------------
 // SetCursorSelectionForFepL
 //
 //
@@ -454,6 +542,11 @@
 		    inputElement->setSelectionStart(lowPos);
 		    inputElement->setSelectionEnd(highPos);
 		}
+        else if (focusedNode->hasTagName(HTMLNames::divTag)) {
+            HTMLDivElement* inputElement = static_cast<HTMLDivElement*>(focusedNode);
+            setSelectionRange(lowPos,highPos,inputElement);
+        }
+        
 		HandleUpdateCursor();
     }
 }
@@ -482,6 +575,13 @@
             TInt cursorPos = inputElement->selectionEnd();
             aCursorSelection.SetSelection(cursorPos, anchorPos);
         }
+        else if (focusedNode->hasTagName(HTMLNames::divTag)) {
+            HTMLDivElement* inputElement = static_cast<HTMLDivElement*>(focusedNode);
+            TInt anchorPos = indexForVisiblePosition(frame->selectionController()->start(),inputElement);
+            TInt cursorPos = indexForVisiblePosition(frame->selectionController()->end(),inputElement);
+            aCursorSelection.SetSelection(cursorPos, anchorPos);
+        }
+        
     }
 }
 
@@ -517,6 +617,12 @@
             str.replace(EKeyLineFeed, CEditableText::EParagraphDelimiter);
             aEditorContent = str;
         }
+        else if (frame->document()->focusedNode()->hasTagName(HTMLNames::divTag)) {
+            HTMLDivElement* ie = static_cast<HTMLDivElement*>(frame->document()->focusedNode());
+            String str(ie->innerText().substring(aDocumentPosition, aLengthToRetrieve));
+            str.replace(EKeyLineFeed, CEditableText::EParagraphDelimiter);
+            aEditorContent = str;
+        }
     }
 }
 
@@ -544,7 +650,8 @@
     frame->document() &&
     frame->document()->focusedNode()){
     if ( frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag) ||
-		 frame->document()->focusedNode()->hasTagName(HTMLNames::textareaTag)){
+		 frame->document()->focusedNode()->hasTagName(HTMLNames::textareaTag) ||
+		 frame->document()->focusedNode()->hasTagName(HTMLNames::divTag)) {
 		HTMLGenericFormElement*  ie = static_cast<HTMLGenericFormElement*>(frame->document()->focusedNode());
 		SelectionController* sc = frame->selectionController();
 		int xPos(0);
@@ -1516,6 +1623,13 @@
              frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag));
     }
 
+TBool CWebFepTextEditor::IsDivElementFocused() const
+    {
+    Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
+    return ( frame && frame->document()->focusedNode() &&
+             frame->document()->focusedNode()->hasTagName(HTMLNames::divTag));
+    }
+
 void CWebFepTextEditor::ReportEventL()
     {
     m_ExtendedInputCapabilities->ReportEventL(CAknExtendedInputCapabilities::
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.h	Tue Sep 14 23:23:58 2010 +0300
@@ -27,10 +27,15 @@
 #include <AknExtendedInputCapabilities.h> 
 #include <eikccpu.h>
 #include <baclipb.h>
+#include <e32cmn.h>
 
 #include "PlatformString.h"
 #include "Node.h"
 #include "Frame.h"
+#include "Element.h"
+#include "VisiblePosition.h"
+#include "Range.h"
+#include "TextIterator.h"
 
 #ifndef WEBFEPTEXTEDITOR_H
 #define WEBFEPTEXTEDITOR_H
@@ -133,6 +138,11 @@
     bool IsWapMaskedModeInput(WebCore::Frame* frame);
     void EnableCcpuL();
     TBool IsInputElementFocused() const;
+    TBool IsDivElementFocused() const;
+    TInt indexForVisiblePosition(const WebCore::VisiblePosition& pos,WebCore::Element* node) const;
+    WebCore::VisiblePosition visiblePositionForIndex(TInt index,WebCore::Element* node);
+    void setSelectionRange(TInt start, TInt end, WebCore::Element* node);    
+    
     void ReportEventL();
     
     TBool inlineTextEditingStarted();
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -86,6 +86,8 @@
 #include "RenderWidget.h"
 #include "HTMLNames.h"
 #include "HTMLInputElement.h"
+#include "HTMLDivElement.h"
+#include "HtmlTextAreaElement.h"
 
 using namespace HTMLNames;
 
@@ -1214,17 +1216,38 @@
     else {  
           //Check is editable node and couples of NULL checking  
          if( m_isEditable && frame && frame->document() && frame->document()->focusedNode() ) {
+             TInt length  = 0;
              //Is inputTag
-             TBool isInputTag = frame->document()->focusedNode()->hasTagName(inputTag); 
-             HTMLInputElement* ie = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
-             TInt length  = 0;
-             //Null checking etc.
-             if( ie && isInputTag ) {
-                 //Get length of inputelement string
-                 length = ie->value().length();
+             TBool isInputTag = frame->document()->focusedNode()->hasTagName(inputTag);
+             TBool isdivTag = frame->document()->focusedNode()->hasTagName(divTag); 
+             TBool isTextAreaTag = frame->document()->focusedNode()->hasTagName(textareaTag); 
+                                       
+             if(isInputTag) {
+                 HTMLInputElement* ie = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
+                 //Null checking etc.
+                 if( ie ) {
+                     //Get length of inputelement string
+                     length = ie->value().length();
+                 }
              }
+             else if(isdivTag) {
+                 HTMLDivElement* ie = static_cast<HTMLDivElement*>(frame->document()->focusedNode());
+                 if( ie ) {
+                     //Get length of inputelement string
+                     length = ie->innerText().length();
+                 }
+             }
+             else if (isTextAreaTag)
+                 { 
+                 HTMLTextAreaElement* ie = static_cast<HTMLTextAreaElement*>(frame->document()->focusedNode());
+                 if( ie ) {
+                     //Get length of inputelement string
+                     length = ie->value().length();
+                 	}
+                 }
+             
              //Check is there data in input field
-             if( length > 0 || !ie ) {
+             if( length > 0) {
                  //If there is data, do the old thing 
                  consumed = ( !m_isEditable &&  //avoid showing the cursor when we are in the input box 
                          handleKeyNavigation(keyevent, eventcode, frame)) ||
--- a/webengine/webkitutils/HistoryProvider/HistoryController.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/webkitutils/HistoryProvider/HistoryController.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -57,7 +57,11 @@
 
 HistoryController::~HistoryController()
 {
-	m_historyStack.ResetAndDestroy();
+    m_historyStack.ResetAndDestroy();
+    if(m_historyView) { 
+        delete m_historyView;
+        m_historyView = NULL; 
+    }
 }
 
 /**
@@ -496,6 +500,9 @@
 */
 void HistoryController::showHistoryViewL(bool previous)
 {
+    if(m_historyView)
+        return; 
+    
     HistoryEntry* entry = entryByIndex(m_currentIndex);
     if (entry && ! entry->thumbnail()) {
         // get scaled page from PageScaler;
@@ -505,7 +512,7 @@
             // Get the browser control rect
             updateHistoryEntryThumbnailL(scaledPage);
         }
-            // ignore err since we will use the default image
+        // ignore err since we will use the default image
     }
     //Defer refresh timers on showing history view
     m_historyCallback->deferTimers(true);
@@ -578,7 +585,9 @@
 
 void HistoryController::performTransition(int direction)
 {
-	m_historyView->performTransition(direction);	
+    if(m_historyView) { 
+        m_historyView->performTransition(direction);
+    } 
 }
 
 /**
--- a/webengine/widgetregistry/Data/Widget_lproj.xml	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/widgetregistry/Data/Widget_lproj.xml	Tue Sep 14 23:23:58 2010 +0300
@@ -194,4 +194,16 @@
 
 <LangID>327</LangID>
 <LangDir>id-APAC</LangDir>
+
+<LangID>14346</LangID>
+<LangDir>en-US</LangDir>
+
+<LangID>14387</LangID>
+<LangDir>fr-CA</LangDir>
+
+<LangID>14412</LangID>
+<LangDir>pt-BR</LangDir>
+
+<LangID>14419</LangID>
+<LangDir>es-419</LangDir>
 </LPROJ>
\ No newline at end of file
--- a/webengine/widgetregistry/Server/src/WidgetRegistry.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/widgetregistry/Server/src/WidgetRegistry.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -739,6 +739,23 @@
         AppArchListConsistency( appArchList, appArchListFlags );
         }
 
+
+    //Do we need consistency check
+    //Quick hack to see if we need consistency check 
+    if(!doConsistency)
+        {
+        AppArchWidgets( appArchList, appArchListFlags );    
+        TInt wrtWidgetCount(0);
+        for(TInt i =0;i<iEntries.Count();i++)
+            {
+            CWidgetEntry* entry = iEntries[i];
+            if(!TUidAllocator::IsCWRTWidget(TUid::Uid((*entry)[EUid])))
+                wrtWidgetCount++;
+            }		   	
+        if(appArchList.Count()!=wrtWidgetCount)
+            aParseError = ETrue;//need consistency
+        }    
+    
     CleanupStack::PopAndDestroy( 2, &appArchList );//appArchListFlags, appArchList
 
     aDirtyFlag = dirtyFlag;
--- a/webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp	Wed Sep 01 12:28:30 2010 +0100
+++ b/webengine/wmlengine/src/htmlp/src/CHtmlpParser.cpp	Tue Sep 14 23:23:58 2010 +0300
@@ -2192,19 +2192,23 @@
     TBrowserStatusCode status = KBrsrSuccess;
     NW_Int32 numUnconvertible, indexFirstUnconvertible;
     NW_Buffer_t* outBuf = NULL;
-    NW_Uint32 i;
+    NW_Uint32 i=0,offset =0;
     static const NW_Ucs2 encodingStr[] = {'e','n','c','o','d','i','n','g','=','\0'};
     NW_Uint32 encodingLen = NW_Str_Strlen(encodingStr)*sizeof(NW_Ucs2);
-    
-    if (NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + iLexer->readPosition), (const NW_Byte*)encodingStr, encodingLen) == 0 && 
+    for(i = iLexer->readPosition + encodingLen - sizeof(NW_Ucs2);(iLexer->pBuf[i] != '"' && iLexer->pBuf[i] != '\'' && iLexer->pBuf[i] != '?' && i < iLexer->byteCount ) ;i+=sizeof(NW_Ucs2))
+        {
+       if(iLexer->pBuf[i] == ' ')
+           offset+= sizeof(NW_Ucs2);
+        }
+    if (NW_Byte_Strnicmp((const NW_Byte*)(iLexer->pBuf + iLexer->readPosition), (const NW_Byte*)encodingStr, encodingLen - sizeof(NW_Ucs2 )) == 0 && 
       (iLexer->pBuf[iLexer->readPosition + encodingLen] == '"' || 
-      iLexer->pBuf[iLexer->readPosition + encodingLen] == '\''))
+      iLexer->pBuf[iLexer->readPosition + encodingLen] == '\'' || offset))
       {
       NW_Buffer_t body;
       NW_Uint32 selectedCharset;
       NW_ASSERT(iCBs->charsetConvertCallback != NULL);
       NW_ASSERT(iCBs->charsetContext != NULL);
-      for (i = iLexer->readPosition + encodingLen + sizeof(NW_Ucs2); 
+      for (i = iLexer->readPosition + encodingLen + sizeof(NW_Ucs2) + offset;  
       i < iLexer->byteCount && iLexer->pBuf[i] != '"' && iLexer->byteCount && iLexer->pBuf[i] != '\'' && iLexer->pBuf[i] != '?'; 
       i += sizeof(NW_Ucs2))
         ;
@@ -2222,7 +2226,7 @@
           status = KBrsrSuccess;
           goto finish_xml_charset;
           }
-        status = iCBs->charsetConvertCallback(iCBs->charsetContext, i - iLexer->readPosition - encodingLen, iLexer->readPosition + encodingLen, &body, 
+        status = iCBs->charsetConvertCallback(iCBs->charsetContext, i - iLexer->readPosition - encodingLen - offset, iLexer->readPosition + encodingLen + offset, &body,
           &numUnconvertible, &indexFirstUnconvertible, &outBuf, &selectedCharset);
         if (status != KBrsrSuccess)
           {