webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp
branchRCL_3
changeset 48 79859ed3eea9
parent 38 4917f9bf7995
child 49 919f36ff910f
--- a/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp	Thu Aug 19 10:58:56 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.cpp	Tue Aug 31 16:17:46 2010 +0300
@@ -16,21 +16,16 @@
 */
 
 // INCLUDE FILES
-#include <browser_platform_variant.hrh>
 #include <../bidi.h>
-#include <brctldialogsprovider.h>
-
 #include "WebFormFillPopup.h"
 #include "WebView.h"
 #include "WebFrame.h"
 #include "WebFrameView.h"
-#include <brctldefs.h>
+#include "BrCtlDefs.h"
 #include "PopupSelectListBox.h"
-
+#include "BrCtlDialogsProvider.h"
 #include "WebFepTextEditor.h"
 #include "FormFillCallback.h"
-#include "Page.h"
-#include "WebChromeClient.h"
 
 #include <aknenv.h>
 #include <coemain.h>
@@ -40,15 +35,14 @@
 
 #include "eikon.hrh"
 
+
 static const TInt KMaxNumToShow = 6; // max number of list items to show
 static const TInt KInitArraySize = 10; // initial array size
 static const TInt KBorderSize = 1; // List Box Border size
 static const TInt KListBoxPadding = 12;
 static const TInt KListBoxMinWidth = 100;
 static const TInt KListBoxMargin = 6;
-// CONSTANTS
 
-const static TInt KItemSpacerInPixels = 2;
 WebFormFillPopup* WebFormFillPopup::NewL(WebView* parent, CFont* font, MFormFillCallback* callback)
 {
     WebFormFillPopup* self = new (ELeave) WebFormFillPopup(parent, font, callback);
@@ -197,9 +191,7 @@
             break;
 
     }
-    if (response == EKeyWasConsumed) {
-          m_parent->page()->chrome()->client()->setElementVisibilityChanged(false);
-        }
+
     return response;
 }
 
@@ -250,9 +242,6 @@
 
     }
 
-    if (response == EKeyWasConsumed) {
-      m_parent->page()->chrome()->client()->setElementVisibilityChanged(false);
-    }
     return response;
 }
 
@@ -276,11 +265,8 @@
 {
     if (aListBox != m_listBox)
         return;
-#ifdef BRDO_SINGLE_CLICK_ENABLED_FF
-    if (aEventType == EEventItemDoubleClicked || aEventType == EEventEnterKeyPressed || aEventType == EEventItemSingleClicked || aEventType == EEventEmptyAreaClicked)
-#else        
+
     if (aEventType == EEventItemDoubleClicked || aEventType == EEventEnterKeyPressed)
-#endif        
     {
         // get the selected item from listbox
         m_listBox->View()->UpdateSelectionL(CListBoxView::ESingleSelection);
@@ -288,8 +274,7 @@
         if (m_listBox->IsFocused())
         {
             MakeVisible(EFalse);
-            if(selected != NULL && m_data[selected->At(0)] )
-               m_callback->autoComplete(m_data[selected->At(0)]->Text());
+            m_callback->autoComplete(m_data[selected->At(0)]->Text());
         }
     }
     else if (aEventType == EEventPenDownOnItem) {
@@ -373,14 +358,6 @@
     else {
         m_callback->cancelPopup();
     }
-    m_parent->page()->chrome()->client()->setElementVisibilityChanged(false);
 }
 
-void WebFormFillPopup::setFont(CFont* font)
-{
-    m_font = font;
-    CTextListItemDrawer* itemDrawer = (CTextListItemDrawer*) m_listBox->View()->ItemDrawer();
-    itemDrawer->SetFont(font); 
-    m_listBox->SetItemHeightL(m_font->HeightInPixels()+ KItemSpacerInPixels);
-}
 //  End of File