--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Tue Aug 31 16:17:46 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp Wed Sep 01 12:28:30 2010 +0100
@@ -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();
}
// -----------------------------------------------------------------------------
@@ -791,6 +798,9 @@
{
m_pos = pt;
m_sprite->SetPos(pt);
+#ifdef BRDO_TOUCH_ENABLED_FF
+ m_sprite->Hide();
+#endif
WebFrame* frame = getFrameAtPoint(pt);
TBrCtlDefs::TBrCtlElementType elType;
TRect r;
@@ -799,6 +809,7 @@
m_view->setFocusedElementType(elType);
}
else {
+ if(m_view)
m_view->setFocusedElementType(TBrCtlDefs::EElementNone);
}
}