Changeset 85206 in webkit


Ignore:
Timestamp:
Apr 28, 2011 10:40:10 AM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

2011-04-28 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Andreas Kling.

Remove flag ENABLE_SYMBIAN_DIALOG_PROVIDER
https://bugs.webkit.org/show_bug.cgi?id=59704

No new tests, just code cleanup.

  • WebCore.pri:

2011-04-28 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Andreas Kling.

Remove flag ENABLE_SYMBIAN_DIALOG_PROVIDER
https://bugs.webkit.org/show_bug.cgi?id=59704

  • WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopup::show):
  • WebCoreSupport/QtFallbackWebPopup.h:
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85204 r85206  
     12011-04-28  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Remove flag ENABLE_SYMBIAN_DIALOG_PROVIDER
     6        https://bugs.webkit.org/show_bug.cgi?id=59704
     7
     8        No new tests, just code cleanup.
     9
     10        * WebCore.pri:
     11
    1122011-04-28  Pavel Podivilov  <podivilov@chromium.org>
    213
  • trunk/Source/WebCore/WebCore.pri

    r84364 r85206  
    277277}
    278278
    279 contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
    280     # this feature requires the S60 platform private BrowserDialogsProvider.h header file
    281     # and is therefore not enabled by default but only meant for platform builds.
    282     symbian {
    283         LIBS += -lbrowserdialogsprovider
    284     }
    285 }
    286 
    287279!CONFIG(webkit-debug):CONFIG(QTDIR_build) {
    288280    # Remove the following 2 lines if you want debug information in WebCore
  • trunk/Source/WebKit/qt/ChangeLog

    r85062 r85206  
     12011-04-28  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Remove flag ENABLE_SYMBIAN_DIALOG_PROVIDER
     6        https://bugs.webkit.org/show_bug.cgi?id=59704
     7
     8        * WebCoreSupport/QtFallbackWebPopup.cpp:
     9        (WebCore::QtFallbackWebPopup::show):
     10        * WebCoreSupport/QtFallbackWebPopup.h:
     11
    1122011-04-27  Yi Shen  <yi.4.shen@nokia.com>
    213
  • trunk/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp

    r82075 r85206  
    3636#include <QStandardItemModel>
    3737
    38 #if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
    39 #include <BrCtlDialogsProvider.h>
    40 #include <BrowserDialogsProvider.h> // S60 platform private header file
    41 #include <e32base.h>
    42 #endif
    43 
    4438namespace WebCore {
    4539
     
    114108        return;
    115109
    116 #if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
    117     TRAP_IGNORE(showS60BrowserDialog());
    118 #else
    119 
    120110    destroyPopup();
    121111    m_combo = new QtFallbackWebPopupCombo(*this);
     
    151141                      Qt::LeftButton, Qt::NoModifier);
    152142    QCoreApplication::sendEvent(m_combo, &event);
    153 #endif
    154 }
    155 
    156 #if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
    157 
    158 static void ResetAndDestroy(TAny* aPtr)
    159 {
    160     RPointerArray<HBufC>* items = reinterpret_cast<RPointerArray<HBufC>* >(aPtr);
    161     items->ResetAndDestroy();
    162 }
    163 
    164 void QtFallbackWebPopup::showS60BrowserDialog()
    165 {
    166     static MBrCtlDialogsProvider* dialogs = CBrowserDialogsProvider::NewL(0);
    167     if (!dialogs)
    168         return;
    169 
    170     int size = itemCount();
    171     CArrayFix<TBrCtlSelectOptionData>* options = new CArrayFixFlat<TBrCtlSelectOptionData>(qMax(1, size));
    172     RPointerArray<HBufC> items(qMax(1, size));
    173     CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &items));
    174 
    175     for (int i = 0; i < size; i++) {
    176         if (itemType(i) == Separator) {
    177             TBrCtlSelectOptionData data(_L("----------"), false, false, false);
    178             options->AppendL(data);
    179         } else {
    180             HBufC16* itemStr = HBufC16::NewL(itemText(i).length());
    181             itemStr->Des().Copy((const TUint16*)itemText(i).utf16(), itemText(i).length());
    182             CleanupStack::PushL(itemStr);
    183             TBrCtlSelectOptionData data(*itemStr, i == currentIndex(), false, itemIsEnabled(i));
    184             options->AppendL(data);
    185             items.AppendL(itemStr);
    186             CleanupStack::Pop();
    187         }
    188     }
    189 
    190     dialogs->DialogSelectOptionL(KNullDesC(), (TBrCtlSelectOptionType)(ESelectTypeSingle | ESelectTypeWithFindPane), *options);
    191 
    192     CleanupStack::PopAndDestroy(&items);
    193 
    194     int newIndex;
    195     for (newIndex = 0; newIndex < options->Count() && !options->At(newIndex).IsSelected(); newIndex++) {}
    196     if (newIndex == options->Count())
    197         newIndex = currentIndex();
    198    
    199     m_popupVisible = false;
    200     popupDidHide();
    201 
    202     if (currentIndex() != newIndex && newIndex >= 0)
    203         valueChanged(newIndex);
    204 
    205     delete options;
    206 }
    207 #endif
     143}
    208144
    209145void QtFallbackWebPopup::hide()
  • trunk/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h

    r64829 r85206  
    7070
    7171    void populate(const QWebSelectData&);
    72 #if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
    73     void showS60BrowserDialog();
    74 #endif
    7572};
    7673
Note: See TracChangeset for help on using the changeset viewer.