webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp
branchRCL_3
changeset 67 4917f9bf7995
parent 59 1f3c3f2f5b0a
child 92 e1bea15f9a39
equal deleted inserted replaced
64:ac77f89b1d9e 67:4917f9bf7995
    77 {
    77 {
    78     if(m_results.size() > 0) {
    78     if(m_results.size() > 0) {
    79         // lazily create the popup view
    79         // lazily create the popup view
    80         PlatformFontCache* cache = StaticObjectsContainer::instance()->fontCache();
    80         PlatformFontCache* cache = StaticObjectsContainer::instance()->fontCache();
    81         float zoomFactor =  (float)cache->fontZoomFactor();
    81         float zoomFactor =  (float)cache->fontZoomFactor();
       
    82         // system font to be used by popup
       
    83 
       
    84         float newFont = 12.0f * zoomFactor /100.0f;
       
    85         FontDescription fd; 
       
    86         fd.setComputedSize(newFont);
       
    87         //If zoom factor is greater than 120 and less than or equals 200, then make it 125 by default. This
       
    88         //will make it selectable not too big.
       
    89         FontPlatformData* font = new FontPlatformData(cache->zoomedFont(fd, (zoomFactor > 120)? KMaxZoomFactorForPopup : zoomFactor));;
    82         if(!m_popup) {
    90         if(!m_popup) {
    83             // system font to be used by popup
       
    84 
       
    85             float newFont = 12.0f * zoomFactor /100.0f;
       
    86             FontDescription fd;
       
    87             fd.setComputedSize(newFont);
       
    88             //If zoom factor is greater than 120 and less than or equals 200, then make it 125 by default. This
       
    89             //will make it selectable not too big.
       
    90             FontPlatformData* font = new FontPlatformData(cache->zoomedFont(fd, (zoomFactor > 120)? KMaxZoomFactorForPopup : zoomFactor));;
       
    91             m_popup = m_callback->createFormFillPopup(font->Font());
    91             m_popup = m_callback->createFormFillPopup(font->Font());
    92             delete font; 
    92         }
    93         }
    93         else
       
    94         {
       
    95             m_popup->setFont(font->Font());
       
    96         }
       
    97         delete font; 
    94         if (!m_popup) {
    98         if (!m_popup) {
    95             return;
    99             return;
    96         }
   100         }
    97         m_popup->clear();
   101         m_popup->clear();
    98         // fill the popup
   102         // fill the popup