webengine/osswebengine/WebKit/s60/webview/WebView.cpp
branchRCL_3
changeset 91 30342f40acbf
parent 84 800203832575
child 92 e1bea15f9a39
equal deleted inserted replaced
84:800203832575 91:30342f40acbf
   395     m_userAgent->Des().Copy(userAgent8->Des());
   395     m_userAgent->Des().Copy(userAgent8->Des());
   396     CleanupStack::PopAndDestroy(2); // userAgent8, usrAgnt
   396     CleanupStack::PopAndDestroy(2); // userAgent8, usrAgnt
   397 
   397 
   398     MakeViewVisible(ETrue);
   398     MakeViewVisible(ETrue);
   399     CCoeControl::SetFocus(ETrue);
   399     CCoeControl::SetFocus(ETrue);
   400     
   400 
       
   401 #ifndef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
   401     cache()->setCapacities(0, 0, defaultCacheCapacity);
   402     cache()->setCapacities(0, 0, defaultCacheCapacity);
       
   403 #endif    
   402     
   404     
   403     m_waiter = new(ELeave) CActiveSchedulerWait();
   405     m_waiter = new(ELeave) CActiveSchedulerWait();
   404     
   406     
   405     m_checkerBoardDestroyTimer = CPeriodic::NewL(CActive::EPriorityIdle);
   407     m_checkerBoardDestroyTimer = CPeriodic::NewL(CActive::EPriorityIdle);
   406     
   408     
  1197         }
  1199         }
  1198     if (tabbedNavigation) {
  1200     if (tabbedNavigation) {
  1199         consumed = downEventConsumed || handleTabbedNavigation(m_currentEventKey, m_currentEventCode);
  1201         consumed = downEventConsumed || handleTabbedNavigation(m_currentEventKey, m_currentEventCode);
  1200     }
  1202     }
  1201     else {  
  1203     else {  
  1202         consumed = (!m_isEditable &&  //avoid showing the cursor when we are in the input box 
  1204           //Check is editable node and couples of NULL checking  
  1203                     handleKeyNavigation(keyevent, eventcode, frame)) ||
  1205          if( m_isEditable && frame && frame->document() && frame->document()->focusedNode() ) {
  1204                     downEventConsumed;
  1206              //Is inputTag
       
  1207              TBool isInputTag = frame->document()->focusedNode()->hasTagName(inputTag); 
       
  1208              HTMLInputElement* ie = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
       
  1209              TInt length  = 0;
       
  1210              //Null checking etc.
       
  1211              if( ie && isInputTag ) {
       
  1212                  //Get length of inputelement string
       
  1213                  length = ie->value().length();
       
  1214              }
       
  1215              //Check is there data in input field
       
  1216              if( length > 0 || !ie ) {
       
  1217                  //If there is data, do the old thing 
       
  1218                  consumed = ( !m_isEditable &&  //avoid showing the cursor when we are in the input box 
       
  1219                          handleKeyNavigation(keyevent, eventcode, frame)) ||
       
  1220                          downEventConsumed;
       
  1221              } 
       
  1222              else {
       
  1223                    //else continue navigation and avoid jamming in some inputboxes
       
  1224                    consumed = handleKeyNavigation( keyevent, eventcode, frame );    
       
  1225              }
       
  1226          } 
       
  1227          else {
       
  1228                consumed = ( !m_isEditable &&  //avoid showing the cursor when we are in the input box 
       
  1229                        handleKeyNavigation(keyevent, eventcode, frame)) ||
       
  1230                        downEventConsumed;    
       
  1231          }
  1205     }
  1232     }
  1206     return consumed;
  1233     return consumed;
  1207 }
  1234 }
  1208 
  1235 
  1209 bool WebView::handleInputElement(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)
  1236 bool WebView::handleInputElement(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)