Changeset 19913 in webkit
- Timestamp:
- Feb 28, 2007 2:11:18 PM (17 years ago)
- Location:
- S60/branches/3.1m/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/branches/3.1m/WebKit/BrowserView/src/KeyEventHandler.cpp
r19466 r19913 166 166 // clear the last event key 167 167 iLastEventKey = KNullKeyEvent; 168 iElType = iWebKitView->FocusedElementType(); 168 169 return EKeyWasNotConsumed; 169 170 } … … 195 196 case EKeyDevice3: 196 197 { 197 iElType = iWebKitView->FocusedElementType(); 198 /* 199 Toolbar is activated on long key press only if the element type during keydown and element type 200 during EEventKey are EElementNone. This prevents toolbar from popping up in 201 DHTML pages. Also, toolbar is activated when the user is not in fast scroll mode or in page overview mode 202 */ 203 if( iElType == TBrCtlDefs::EElementNone 204 && iWebKitView->FocusedElementType() == TBrCtlDefs::EElementNone 205 && aKeyEvent.iRepeats 206 && iWebKitView->WebKitControl().BrCtl().Capabilities() & TBrCtlDefs::ECapabilityToolBar 207 && !iJoystickTimer->IsActive() 208 && !iWebKitView->WebKitControl().InPageViewMode() 209 ) 210 { 211 iWebKitView->LaunchToolBarL(); 212 // and send the keyrelease event to webcore. otherwise, webcore gets 213 // stuck in keypressed state 214 CWebKitFrame* f = iWebKitView->MainFrame().FocusedFrame(); 215 if( f == NULL ) 216 { 217 f = &iWebKitView->MainFrame(); 218 } 219 220 //send the keypress event to webcore, so that it is not in keypress state 221 TPoint absCursorPos = iWebKitView->Cursor()->Position() + iWebKitView->MainFrame().ToViewCoords(iWebKitView->MainFrame().ContentPosition()); 222 absCursorPos -= f->RectInGlobalCoords().iTl; 223 absCursorPos = iWebKitView->MainFrame().ToDocCoords(absCursorPos); 224 TPointerEvent event; 225 event.iPosition = absCursorPos; 226 event.iModifiers = 0; 227 event.iType = TPointerEvent::EButton1Up; 228 229 f->WebKitBridge().WebCoreBridge().PointerEvent(event); 230 return EKeyWasConsumed; 231 } 198 232 // fake key event down 199 233 keyResponse = HandleActivateKeysL( aKeyEvent, EEventKeyDown ); … … 469 503 TKeyResponse 470 504 CKeyEventHandler::HandleActivateKeysL( 471 const TKeyEvent& aKeyEvent,505 const TKeyEvent& /*aKeyEvent*/, 472 506 TEventCode aEventCode ) 473 507 { … … 556 590 else 557 591 { 558 if( iElType == TBrCtlDefs::EElementNone559 && iWebKitView->FocusedElementType() == TBrCtlDefs::EElementNone560 && aEventCode == EEventKeyUp && aKeyEvent.iRepeats == 0561 && iWebKitView->WebKitControl().BrCtl().Capabilities() & TBrCtlDefs::ECapabilityToolBar )562 {563 iWebKitView->LaunchToolBarL();564 // and send the keyrelease event to webcore. otherwise, webcore gets565 // stuck in keypressed state566 TPointerEvent event;567 event.iPosition = absCursorPos;568 event.iModifiers = 0;569 event.iType = TPointerEvent::EButton1Up;570 focused->WebKitBridge().WebCoreBridge().PointerEvent(event);571 return EKeyWasConsumed;572 }573 592 574 593 TPointerEvent event; -
S60/branches/3.1m/WebKit/ChangeLog
r19854 r19913 1 yadavall, Reviewed by Sachin 2 DESC: Toolbar should be activated only on long keypress CR: 102-5945 3 http://bugs.webkit.org/show_bug.cgi?id=12816 4 5 * BrowserView/src/KeyEventHandler.cpp: 6 (CKeyEventHandler::HandleOfferKeyEventL): 7 (CKeyEventHandler::HandleActivateKeysL): 8 1 9 spadma, reviewed by <Yongjun> 2 10 DESC: Urls are doubly encoded. TSW ID: HIIN-6YMGYV
Note: See TracChangeset
for help on using the changeset viewer.