Changeset 19774 in webkit


Ignore:
Timestamp:
Feb 21, 2007 10:55:37 AM (17 years ago)
Author:
brmorris
Message:

brmorris, reviewed by Sachin.

DESC: r19404 caused some regresion, so I'm reverting it. TMCN-6XYSLY
This was a fix for Enhanced Input feature not working in 3.1
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

    r19404 r19774  
    359359        static TInt PredictiveTextOnOffGSNotifiaction( TAny* aObj );
    360360       
     361#ifdef RD_32_BROWSER
    361362        /**
    362363        * Sets the Cursor Position
     
    370371        */
    371372        void SetWebKitCursorPosition(const TKeyEvent& aKeyEvent);
     373#endif
    372374
    373375
  • S60/branches/3.1m/WebKit/BrowserCore/Formcontrols/src/FControlInputWidget.cpp

    r19423 r19774  
    5757#include <WebKit.rsg>
    5858#endif
    59 
     59#ifdef RD_32_BROWSER
    6060#include "WebKitCursor.h"
     61#endif
    6162
    6263#include <centralrepository.h>
     
    8384static const TInt KASCII9 = 0x39;
    8485
     86#ifdef RD_32_BROWSER
    8587static const TInt KCharacterWidth = 6;
    86 
     88#endif
    8789
    8890
     
    255257  {
    256258  TBool t9Allowed;
     259 
     260#ifdef RD_32_BROWSER
    257261  iRect = aInitialRectangle;
    258 
     262#endif
    259263    //Create a new repository
    260264    CRepository* repository = CRepository::NewL( KCRUidAknFep );
     
    368372   
    369373    // move cursor
     374#ifdef RD_32_BROWSER
    370375    SetCursorPositionL(aInitialText, aInitialRectangle);
     376#else
     377    iEditor->SetCursorPosL(iEditor->TextLength(), EFalse);
     378#endif
    371379   
    372380    iEditor->SetiCursorPos();// turns on correct t9 banner based on format
     
    543551    else
    544552        {
     553#ifdef RD_32_BROWSER
    545554      if (iType == ENormal && ((aKeyEvent.iScanCode == EStdKeyRightArrow && CurPos() == 0  &&
    546555        iLastCurPos == iEditor->ReadableTextL()->Length()) ||
     
    554563          {
    555564          response = iEditor->OfferKeyEventL( aKeyEvent, aType );
    556           } 
     565          }
     566#else
     567        response = iEditor->OfferKeyEventL( aKeyEvent, aType );
     568#endif 
    557569       
    558570        }
     
    568580        }
    569581    else if (aType == EEventKey  && (aKeyEvent.iScanCode == EStdKeyUpArrow ||
    570              aKeyEvent.iScanCode == EStdKeyDownArrow ||
    571              aKeyEvent.iScanCode == EStdKeyRightArrow))
     582             aKeyEvent.iScanCode == EStdKeyDownArrow
     583#ifdef RD_32_BROWSER
     584             || aKeyEvent.iScanCode == EStdKeyRightArrow
     585#endif
     586             ))
    572587        {
    573588        SimulateDoneKeyL((TStdScanCode )aKeyEvent.iScanCode );
     
    589604        response = EKeyWasConsumed;
    590605        }
    591 
     606#ifdef RD_32_BROWSER
    592607  iLastCurPos = CurPos();
     608#endif
    593609    return response;
    594610    }
     
    12421258  }
    12431259
     1260#ifdef RD_32_BROWSER
    12441261// ---------------------------------------------------------
    12451262// CControlInputWidget::SetCursorPosition
     
    12501267  {
    12511268  CWebKitView* webkitView = static_cast<CWebKitView*>(iParent);
    1252   CWebKitCursor* cur = webkitView->Cursor();
    1253   if ( !cur )
    1254       {
    1255       return;
    1256       }
    1257   TPoint pos = cur->Position(); 
    1258   TInt fontGap = iFont.FontLineGap();
    1259   TInt lineNumber = 0;
    1260 
    1261   if(fontGap)
    1262     {
    1263     lineNumber = (pos.iY - aInitialRectangle.iTl.iY) / fontGap; //iFont.HeightInPixels();
    1264     }
     1269  TPoint pos = webkitView->Cursor()->Position();
     1270     
     1271    TInt const lineNumber = (pos.iY - aInitialRectangle.iTl.iY) / iFont.FontLineGap(); //iFont.HeightInPixels();
    12651272   
    12661273    if(lineNumber)
     
    12811288    else
    12821289      {
    1283       TRect rect = iEditor->Rect();
    1284       TInt nCharAtPos = iFont.TextCount(aText, pos.iX - rect.iTl.iX);
     1290      TInt nCharAtPos = iFont.TextCount(aText, pos.iX);
    12851291      iEditor->SetCursorPosL(nCharAtPos, EFalse);
    12861292      iLastCurPos = nCharAtPos;   
     
    13331339      }
    13341340  }
     1341#endif
    13351342//  End of File
  • S60/branches/3.1m/WebKit/ChangeLog

    r19731 r19774  
     1brmorris, reviewed by Sachin.
     2        DESC:  r19404 caused some regresion, so I'm reverting it. TMCN-6XYSLY
     3        This was a fix for Enhanced Input feature not working in 3.1
     4        http://bugs.webkit.org/show_bug.cgi?id=12533
     5       
    16yadavall, Reviewed by Zalan Bujtas (zbujtas@gmail.com).
    27        DESC: Browser crashes when trying to open rss link  hs.fi/rss HMNN-6YDEAW
Note: See TracChangeset for help on using the changeset viewer.