equal
deleted
inserted
replaced
134 } |
134 } |
135 |
135 |
136 // ----------------------------------------------------------------------------- |
136 // ----------------------------------------------------------------------------- |
137 // WebCursor::setCurrentView |
137 // WebCursor::setCurrentView |
138 // ----------------------------------------------------------------------------- |
138 // ----------------------------------------------------------------------------- |
139 void WebCursor::setCurrentView(WebView& view) |
139 void WebCursor::setCurrentView(WebView* view) |
140 { |
140 { |
141 if (!m_view) |
141 |
142 { |
142 if( !view ) |
143 m_view = &view; |
143 { |
144 TRAP_IGNORE( constructSpriteL() ); |
144 m_view = view; |
145 } |
145 m_sprite->Hide(); |
|
146 m_sprite->SetParent(NULL); |
|
147 return ; |
|
148 } |
146 //switching between diffrent webviews, set current webview as the parent to m_sprite |
149 //switching between diffrent webviews, set current webview as the parent to m_sprite |
147 if( m_sprite->Parent() != &view) |
150 if( (m_sprite && m_sprite->Parent() != view) || !m_sprite) |
148 { |
151 { |
149 m_view = &view; |
152 m_view = view; |
150 CCoeControl* parent = static_cast<CCoeControl*>(m_view); |
153 if( !m_sprite ) |
|
154 constructSpriteL(); |
|
155 CCoeControl* parent = static_cast<CCoeControl*>(view); |
151 m_sprite->SetParent(parent); |
156 m_sprite->SetParent(parent); |
152 } |
157 m_sprite->Show(); |
153 m_view = &view; |
158 } |
|
159 m_view = view; |
154 setOpaqueUntil(KTransparencyTime); |
160 setOpaqueUntil(KTransparencyTime); |
155 m_transcount = 0; |
161 m_transcount = 0; |
156 } |
162 } |
157 |
163 |
158 // ----------------------------------------------------------------------------- |
164 // ----------------------------------------------------------------------------- |
188 m_transarrowmask->UnlockHeap(); |
194 m_transarrowmask->UnlockHeap(); |
189 delete gc; |
195 delete gc; |
190 CleanupStack::PopAndDestroy(); |
196 CleanupStack::PopAndDestroy(); |
191 ///////////////////////////////// |
197 ///////////////////////////////// |
192 |
198 |
|
199 TPoint pos = TPoint(KInitialOffset,KInitialOffset); |
193 CCoeControl* parent = static_cast<CCoeControl*>(m_view); |
200 CCoeControl* parent = static_cast<CCoeControl*>(m_view); |
194 TPoint pos = TPoint(KInitialOffset,KInitialOffset); |
201 m_sprite = CWebSprite::NewL(parent,pos, m_arrow.m_img, m_arrow.m_msk, ETrue); |
195 m_sprite = CWebSprite::NewL(parent, pos, m_arrow.m_img, m_arrow.m_msk, ETrue); |
202 m_sprite->Hide(); |
196 } |
203 } |
197 |
204 |
198 // ----------------------------------------------------------------------------- |
205 // ----------------------------------------------------------------------------- |
199 // WebCursor::setCursor |
206 // WebCursor::setCursor |
200 // ----------------------------------------------------------------------------- |
207 // ----------------------------------------------------------------------------- |
789 // ----------------------------------------------------------------------------- |
796 // ----------------------------------------------------------------------------- |
790 void WebCursor::updatePositionAndElemType(const TPoint& pt) |
797 void WebCursor::updatePositionAndElemType(const TPoint& pt) |
791 { |
798 { |
792 m_pos = pt; |
799 m_pos = pt; |
793 m_sprite->SetPos(pt); |
800 m_sprite->SetPos(pt); |
|
801 #ifdef BRDO_TOUCH_ENABLED_FF |
|
802 m_sprite->Hide(); |
|
803 #endif |
794 WebFrame* frame = getFrameAtPoint(pt); |
804 WebFrame* frame = getFrameAtPoint(pt); |
795 TBrCtlDefs::TBrCtlElementType elType; |
805 TBrCtlDefs::TBrCtlElementType elType; |
796 TRect r; |
806 TRect r; |
797 TPoint point(frame->frameView()->viewCoordsInFrameCoords(m_pos)); |
807 TPoint point(frame->frameView()->viewCoordsInFrameCoords(m_pos)); |
798 if (m_view && navigableNodeUnderCursor(*frame, point, elType, r)) { |
808 if (m_view && navigableNodeUnderCursor(*frame, point, elType, r)) { |
799 m_view->setFocusedElementType(elType); |
809 m_view->setFocusedElementType(elType); |
800 } |
810 } |
801 else { |
811 else { |
|
812 if(m_view) |
802 m_view->setFocusedElementType(TBrCtlDefs::EElementNone); |
813 m_view->setFocusedElementType(TBrCtlDefs::EElementNone); |
803 } |
814 } |
804 } |
815 } |
805 |
816 |
806 // ----------------------------------------------------------------------------- |
817 // ----------------------------------------------------------------------------- |