Changeset 61848 in webkit


Ignore:
Timestamp:
Jun 25, 2010 4:28:03 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Reviewed by Kenneth Rohde Christiansen.

[EFL] Implement runOpenPanel method. The interface with browser was
already implemented. Now we are actually calling it.
https://bugs.webkit.org/show_bug.cgi?id=40923

  • efl/WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::runOpenPanel): implement method.
  • efl/ewk/ewk_private.h: export to WebCoreSupport the needed method
Location:
trunk/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r61796 r61848  
     12010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [EFL] Implement runOpenPanel method. The interface with browser was
     6        already implemented. Now we are actually calling it.
     7        https://bugs.webkit.org/show_bug.cgi?id=40923
     8
     9        * efl/WebCoreSupport/ChromeClientEfl.cpp:
     10        (WebCore::ChromeClientEfl::runOpenPanel): implement method.
     11        * efl/ewk/ewk_private.h: export to WebCoreSupport the needed method
     12
    1132010-06-24  Jer Noble  <jer.noble@apple.com>
    214
  • trunk/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r61706 r61848  
    3939#endif
    4040#include "EWebKit.h"
     41#include "FileChooser.h"
    4142#include "FloatRect.h"
    4243#include "FrameLoader.h"
     
    385386void ChromeClientEfl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
    386387{
    387     notImplemented();
     388    RefPtr<FileChooser> chooser = prpFileChooser;
     389    bool confirm;
     390    Eina_List* selectedFilenames = 0;
     391    Eina_List* suggestedFilenames = 0;
     392    void* filename;
     393    Vector<String> filenames;
     394
     395    for (unsigned i = 0; i < chooser->filenames().size(); i++) {
     396        CString str = chooser->filenames()[i].utf8();
     397        filename = strdup(str.data());
     398        suggestedFilenames = eina_list_append(suggestedFilenames, filename);
     399    }
     400
     401    confirm = ewk_view_run_open_panel(m_view, kit(frame), chooser->allowsMultipleFiles(), suggestedFilenames, &selectedFilenames);
     402    EINA_LIST_FREE(suggestedFilenames, filename)
     403        free(filename);
     404
     405    if (!confirm)
     406        return;
     407
     408    EINA_LIST_FREE(selectedFilenames, filename) {
     409        filenames.append((char *)filename);
     410        free(filename);
     411    }
     412
     413    if (chooser->allowsMultipleFiles())
     414        chooser->chooseFiles(filenames);
     415    else
     416        chooser->chooseFile(filenames[0]);
    388417}
    389418
  • trunk/WebKit/efl/ewk/ewk_private.h

    r61706 r61848  
    8585uint64_t         ewk_view_exceeded_database_quota(Evas_Object *o, Evas_Object *frame, const char *databaseName, uint64_t current_size, uint64_t expected_size);
    8686
     87Eina_Bool        ewk_view_run_open_panel(Evas_Object *o, Evas_Object *frame, Eina_Bool allows_multiple_files, const Eina_List *suggested_filenames, Eina_List **selected_filenames);
     88
    8789void             ewk_view_repaint(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
    8890void             ewk_view_scroll(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord sx, Evas_Coord sy, Evas_Coord sw, Evas_Coord sh, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch, Eina_Bool main_frame);
Note: See TracChangeset for help on using the changeset viewer.