Changeset 19404 in webkit


Ignore:
Timestamp:
Feb 5, 2007 9:00:04 AM (17 years ago)
Author:
brmorris
Message:

raalexan, Reviewed by Yongjun Zhang.

DESC: Enhanced Input feature not working in 3.1 [TSW TMCN-6XYSLY]
http://bugs.webkit.org/show_bug.cgi?id=12533

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  
    359359        static TInt PredictiveTextOnOffGSNotifiaction( TAny* aObj );
    360360       
    361 #ifdef RD_32_BROWSER
    362361        /**
    363362        * Sets the Cursor Position
     
    371370        */
    372371        void SetWebKitCursorPosition(const TKeyEvent& aKeyEvent);
    373 #endif
    374372
    375373
  • S60/branches/3.1m/WebKit/BrowserCore/Formcontrols/src/FControlInputWidget.cpp

    r15973 r19404  
    5757#include <WebKit.rsg>
    5858#endif
    59 #ifdef RD_32_BROWSER
     59
    6060#include "WebKitCursor.h"
    61 #endif
    6261
    6362#include <centralrepository.h>
     
    8483static const TInt KASCII9 = 0x39;
    8584
    86 #ifdef RD_32_BROWSER
    8785static const TInt KCharacterWidth = 6;
    88 #endif
     86
    8987
    9088
     
    257255  {
    258256  TBool t9Allowed;
    259  
    260 #ifdef RD_32_BROWSER
    261257  iRect = aInitialRectangle;
    262 #endif
     258
    263259    //Create a new repository
    264260    CRepository* repository = CRepository::NewL( KCRUidAknFep );
     
    372368   
    373369    // move cursor
    374 #ifdef RD_32_BROWSER
    375370    SetCursorPositionL(aInitialText, aInitialRectangle);
    376 #else
    377     iEditor->SetCursorPosL(iEditor->TextLength(), EFalse);
    378 #endif
    379371   
    380372    iEditor->SetiCursorPos();// turns on correct t9 banner based on format
     
    535527    else
    536528        {
    537 #ifdef RD_32_BROWSER
    538529      if (iType == ENormal && ((aKeyEvent.iScanCode == EStdKeyRightArrow && CurPos() == 0  &&
    539530        iLastCurPos == iEditor->ReadableTextL()->Length()) ||
     
    547538          {
    548539          response = iEditor->OfferKeyEventL( aKeyEvent, aType );
    549           }
    550 #else
    551         response = iEditor->OfferKeyEventL( aKeyEvent, aType );
    552 #endif 
     540          } 
    553541       
    554542        }
     
    564552        }
    565553    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))
    571556        {
    572557        SimulateDoneKeyL((TStdScanCode )aKeyEvent.iScanCode );
     
    588573        response = EKeyWasConsumed;
    589574        }
    590 #ifdef RD_32_BROWSER
     575
    591576  iLastCurPos = CurPos();
    592 #endif
    593577    return response;
    594578    }
     
    12421226  }
    12431227
    1244 #ifdef RD_32_BROWSER
    12451228// ---------------------------------------------------------
    12461229// CControlInputWidget::SetCursorPosition
     
    12511234  {
    12521235  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    }
    12561249   
    12571250    if(lineNumber)
     
    12721265    else
    12731266      {
    1274       TInt nCharAtPos = iFont.TextCount(aText, pos.iX);
     1267      TRect rect = iEditor->Rect();
     1268      TInt nCharAtPos = iFont.TextCount(aText, pos.iX - rect.iTl.iX);
    12751269      iEditor->SetCursorPosL(nCharAtPos, EFalse);
    12761270      iLastCurPos = nCharAtPos;   
     
    13231317      }
    13241318  }
    1325 #endif
    13261319//  End of File
  • S60/branches/3.1m/WebKit/ChangeLog

    r19372 r19404  
     1raalexan, 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
    112yongjzha, Reviewed by zalan.
    213        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.