Changeset 19404 in webkit
- Timestamp:
- Feb 5, 2007 9:00:04 AM (17 years ago)
- Location:
- S60/branches/3.1m/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/branches/3.1m/WebKit/BrowserCore/Formcontrols/inc/FControlInputWidget.h
r15509 r19404 359 359 static TInt PredictiveTextOnOffGSNotifiaction( TAny* aObj ); 360 360 361 #ifdef RD_32_BROWSER362 361 /** 363 362 * Sets the Cursor Position … … 371 370 */ 372 371 void SetWebKitCursorPosition(const TKeyEvent& aKeyEvent); 373 #endif374 372 375 373 -
S60/branches/3.1m/WebKit/BrowserCore/Formcontrols/src/FControlInputWidget.cpp
r15973 r19404 57 57 #include <WebKit.rsg> 58 58 #endif 59 #ifdef RD_32_BROWSER 59 60 60 #include "WebKitCursor.h" 61 #endif62 61 63 62 #include <centralrepository.h> … … 84 83 static const TInt KASCII9 = 0x39; 85 84 86 #ifdef RD_32_BROWSER87 85 static const TInt KCharacterWidth = 6; 88 #endif 86 89 87 90 88 … … 257 255 { 258 256 TBool t9Allowed; 259 260 #ifdef RD_32_BROWSER261 257 iRect = aInitialRectangle; 262 #endif 258 263 259 //Create a new repository 264 260 CRepository* repository = CRepository::NewL( KCRUidAknFep ); … … 372 368 373 369 // move cursor 374 #ifdef RD_32_BROWSER375 370 SetCursorPositionL(aInitialText, aInitialRectangle); 376 #else377 iEditor->SetCursorPosL(iEditor->TextLength(), EFalse);378 #endif379 371 380 372 iEditor->SetiCursorPos();// turns on correct t9 banner based on format … … 535 527 else 536 528 { 537 #ifdef RD_32_BROWSER538 529 if (iType == ENormal && ((aKeyEvent.iScanCode == EStdKeyRightArrow && CurPos() == 0 && 539 530 iLastCurPos == iEditor->ReadableTextL()->Length()) || … … 547 538 { 548 539 response = iEditor->OfferKeyEventL( aKeyEvent, aType ); 549 } 550 #else 551 response = iEditor->OfferKeyEventL( aKeyEvent, aType ); 552 #endif 540 } 553 541 554 542 } … … 564 552 } 565 553 else if (aType == EEventKey && (aKeyEvent.iScanCode == EStdKeyUpArrow || 566 aKeyEvent.iScanCode == EStdKeyDownArrow 567 #ifdef RD_32_BROWSER 568 || aKeyEvent.iScanCode == EStdKeyRightArrow 569 #endif 570 )) 554 aKeyEvent.iScanCode == EStdKeyDownArrow || 555 aKeyEvent.iScanCode == EStdKeyRightArrow)) 571 556 { 572 557 SimulateDoneKeyL((TStdScanCode )aKeyEvent.iScanCode ); … … 588 573 response = EKeyWasConsumed; 589 574 } 590 #ifdef RD_32_BROWSER 575 591 576 iLastCurPos = CurPos(); 592 #endif593 577 return response; 594 578 } … … 1242 1226 } 1243 1227 1244 #ifdef RD_32_BROWSER1245 1228 // --------------------------------------------------------- 1246 1229 // CControlInputWidget::SetCursorPosition … … 1251 1234 { 1252 1235 CWebKitView* webkitView = static_cast<CWebKitView*>(iParent); 1253 TPoint pos = webkitView->Cursor()->Position(); 1254 1255 TInt const lineNumber = (pos.iY - aInitialRectangle.iTl.iY) / iFont.FontLineGap(); //iFont.HeightInPixels(); 1236 CWebKitCursor* cur = webkitView->Cursor(); 1237 if ( !cur ) 1238 { 1239 return; 1240 } 1241 TPoint pos = cur->Position(); 1242 TInt fontGap = iFont.FontLineGap(); 1243 TInt lineNumber = 0; 1244 1245 if(fontGap) 1246 { 1247 lineNumber = (pos.iY - aInitialRectangle.iTl.iY) / fontGap; //iFont.HeightInPixels(); 1248 } 1256 1249 1257 1250 if(lineNumber) … … 1272 1265 else 1273 1266 { 1274 TInt nCharAtPos = iFont.TextCount(aText, pos.iX); 1267 TRect rect = iEditor->Rect(); 1268 TInt nCharAtPos = iFont.TextCount(aText, pos.iX - rect.iTl.iX); 1275 1269 iEditor->SetCursorPosL(nCharAtPos, EFalse); 1276 1270 iLastCurPos = nCharAtPos; … … 1323 1317 } 1324 1318 } 1325 #endif1326 1319 // End of File -
S60/branches/3.1m/WebKit/ChangeLog
r19372 r19404 1 raalexan, Reviewed by Yongjun Zhang. 2 DESC: Enhanced Input feature not working in 3.1 [TSW TMCN-6XYSLY] 3 http://bugs.webkit.org/show_bug.cgi?id=12533 4 5 * BrowserCore/Formcontrols/inc/FControlInputWidget.h: 6 * BrowserCore/Formcontrols/src/FControlInputWidget.cpp: 7 (CControlInputWidget::ConstructTextEditorL): 8 (CControlInputWidget::OfferKeyEventL): 9 (CControlInputWidget::SetCursorPositionL): 10 (CControlInputWidget::SetWebKitCursorPosition): 11 1 12 yongjzha, Reviewed by zalan. 2 13 DESC: backport google.com/ig refreshing memory leak fix in <http://bugs.webkit.org/show_bug.cgi?id=10773> PPEN-6QYG7L
Note: See TracChangeset
for help on using the changeset viewer.