2010-02-17 Kent Tamura <tkent@chromium.org>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2010 04:36:36 +0000 (04:36 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Feb 2010 04:36:36 +0000 (04:36 +0000)
        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        It's hard for Chromium port to load an icon inside
        Icon::createIconForFiles() because of sanbox and multi-process
        architecture. So this change adds a method to request an icon to
        Chrome class, and makes FileChooser receives an Icon instance
        asynchronously.  Synchronous loading also works with the new interface.

        Because all ports don't have implementations of Chrome::iconForFiles()
        yet, FileChooser tries to load an Icon synchronously with
        Icon::createIconForFiles(), then tries to load an Icon asynchronously
        with Chrome::iconForFiles() if Icon::createIconForFiles() returns 0.

        The existing Icon::createIconForFiles() implementations should be
        moved to Chrome::iconForFiles(). We're going to remove
        Icon::createIconForFiles().

        * loader/EmptyClients.h:
        (WebCore::EmptyChromeClient::iconForFiles): Add an empty implementation.
        * page/Chrome.cpp:
        (WebCore::Chrome::iconForFiles): Delegate to ChromeClient::iconForFiles().
        * page/Chrome.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::iconForFiles): Add a declaration as a pure virtual method.
        * platform/FileChooser.cpp:
        (WebCore::FileChooser::FileChooser): Use loadIcon().
        (WebCore::FileChooser::chooseFiles): ditto.
        (WebCore::FileChooser::loadIcon): Added.
        (WebCore::FileChooser::iconLoaded): Added.
        * platform/FileChooser.h: Add two methods to FileChooserClient; repaint() and iconForFiles().
        * platform/graphics/Icon.h: Add a FIXME comment.
        * platform/graphics/gtk/IconGtk.cpp: ditto.
        * platform/graphics/mac/IconMac.mm: ditto.
        * platform/graphics/qt/IconQt.cpp: ditto.
        * platform/graphics/win/IconWin.cpp: ditto.
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::iconForFiles): Delegate to Chrome::iconForFiles().
        (WebCore::RenderFileUploadControl::click): Use chrome().
        (WebCore::RenderFileUploadControl::chrome):
        * rendering/RenderFileUploadControl.h:
        (WebCore::RenderFileUploadControl::repaint):

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * src/ChromeClientImpl.cpp:
        (WebKit::ChromeClientImpl::iconForFiles):
        * src/ChromeClientImpl.h:

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::iconForFiles):
        * WebCoreSupport/ChromeClientGtk.h:

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebCoreSupport/ChromeClientHaiku.cpp:
        (WebCore::ChromeClientHaiku::iconForFiles):
        * WebCoreSupport/ChromeClientHaiku.h:

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::iconForFiles):

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::iconForFiles):
        * WebCoreSupport/ChromeClientQt.h:

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebCoreSupport/WebChromeClient.cpp:
        (WebChromeClient::iconForFiles):
        * WebCoreSupport/WebChromeClient.h:

2010-02-17  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Introduces new Icon loading interface in order to support
        asynchronous loading.
        https://bugs.webkit.org/show_bug.cgi?id=32054

        Add an empty implementation of ChromeClient::iconForFiles().

        * WebKitSupport/ChromeClientWx.cpp:
        (WebCore::ChromeClientWx::iconForFiles):
        * WebKitSupport/ChromeClientWx.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@54923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 files changed:
WebCore/ChangeLog
WebCore/loader/EmptyClients.h
WebCore/page/Chrome.cpp
WebCore/page/Chrome.h
WebCore/page/ChromeClient.h
WebCore/platform/FileChooser.cpp
WebCore/platform/FileChooser.h
WebCore/platform/graphics/Icon.h
WebCore/platform/graphics/gtk/IconGtk.cpp
WebCore/platform/graphics/mac/IconMac.mm
WebCore/platform/graphics/qt/IconQt.cpp
WebCore/platform/graphics/win/IconWin.cpp
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderFileUploadControl.h
WebKit/chromium/ChangeLog
WebKit/chromium/src/ChromeClientImpl.cpp
WebKit/chromium/src/ChromeClientImpl.h
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
WebKit/haiku/ChangeLog
WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebChromeClient.h
WebKit/mac/WebCoreSupport/WebChromeClient.mm
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
WebKit/qt/WebCoreSupport/ChromeClientQt.h
WebKit/win/ChangeLog
WebKit/win/WebCoreSupport/WebChromeClient.cpp
WebKit/win/WebCoreSupport/WebChromeClient.h
WebKit/wx/ChangeLog
WebKit/wx/WebKitSupport/ChromeClientWx.cpp
WebKit/wx/WebKitSupport/ChromeClientWx.h

index 648b550..8196d8b 100644 (file)
@@ -1,3 +1,51 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        It's hard for Chromium port to load an icon inside
+        Icon::createIconForFiles() because of sanbox and multi-process
+        architecture. So this change adds a method to request an icon to
+        Chrome class, and makes FileChooser receives an Icon instance
+        asynchronously.  Synchronous loading also works with the new interface.
+
+        Because all ports don't have implementations of Chrome::iconForFiles()
+        yet, FileChooser tries to load an Icon synchronously with
+        Icon::createIconForFiles(), then tries to load an Icon asynchronously
+        with Chrome::iconForFiles() if Icon::createIconForFiles() returns 0.
+
+        The existing Icon::createIconForFiles() implementations should be
+        moved to Chrome::iconForFiles(). We're going to remove
+        Icon::createIconForFiles().
+
+        * loader/EmptyClients.h:
+        (WebCore::EmptyChromeClient::iconForFiles): Add an empty implementation.
+        * page/Chrome.cpp:
+        (WebCore::Chrome::iconForFiles): Delegate to ChromeClient::iconForFiles().
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::iconForFiles): Add a declaration as a pure virtual method.
+        * platform/FileChooser.cpp:
+        (WebCore::FileChooser::FileChooser): Use loadIcon().
+        (WebCore::FileChooser::chooseFiles): ditto.
+        (WebCore::FileChooser::loadIcon): Added.
+        (WebCore::FileChooser::iconLoaded): Added.
+        * platform/FileChooser.h: Add two methods to FileChooserClient; repaint() and iconForFiles().
+        * platform/graphics/Icon.h: Add a FIXME comment.
+        * platform/graphics/gtk/IconGtk.cpp: ditto.
+        * platform/graphics/mac/IconMac.mm: ditto.
+        * platform/graphics/qt/IconQt.cpp: ditto.
+        * platform/graphics/win/IconWin.cpp: ditto.
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::iconForFiles): Delegate to Chrome::iconForFiles().
+        (WebCore::RenderFileUploadControl::click): Use chrome().
+        (WebCore::RenderFileUploadControl::chrome):
+        * rendering/RenderFileUploadControl.h:
+        (WebCore::RenderFileUploadControl::repaint):
+
 2010-02-17  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Darin Adler.
index c0b06d5..268b711 100644 (file)
@@ -146,6 +146,7 @@ public:
 #endif
 
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
+    virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) { }
 
     virtual void formStateDidChange(const Node*) { }
 
index d79b417..974a39f 100644 (file)
@@ -415,6 +415,11 @@ void Chrome::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser)
     m_client->runOpenPanel(frame, fileChooser);
 }
 
+void Chrome::iconForFiles(const Vector<String>& filenames, PassRefPtr<FileChooser> fileChooser)
+{
+    m_client->iconForFiles(filenames, fileChooser);
+}
+
 bool Chrome::setCursor(PlatformCursorHandle cursor)
 {
     return m_client->setCursor(cursor);
index 542526b..b37e7eb 100644 (file)
@@ -131,6 +131,7 @@ namespace WebCore {
         void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
 
         void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+        void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
 
         bool setCursor(PlatformCursorHandle);
 
index db52c9d..1421631 100644 (file)
@@ -185,6 +185,9 @@ namespace WebCore {
         virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) = 0;
             
         virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0;
+        // Asynchronous request to load an icon for specified filenames.
+        // This is called only if Icon::createIconForFiles() returns 0.
+        virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>) = 0;
 
         virtual bool setCursor(PlatformCursorHandle) = 0;
 
index 9fad392..a2d4770 100644 (file)
@@ -39,9 +39,9 @@ FileChooserClient::~FileChooserClient()
 
 inline FileChooser::FileChooser(FileChooserClient* client, const Vector<String>& initialFilenames)
     : m_client(client)
-    , m_icon(Icon::createIconForFiles(initialFilenames))
 {
     m_filenames = initialFilenames;
+    loadIcon();
 }
 
 PassRefPtr<FileChooser> FileChooser::create(FileChooserClient* client, const Vector<String>& initialFilenames)
@@ -71,9 +71,24 @@ void FileChooser::chooseFiles(const Vector<String>& filenames)
     if (m_filenames == filenames)
         return;
     m_filenames = filenames;
-    m_icon = Icon::createIconForFiles(filenames);
+    loadIcon();
     if (m_client)
         m_client->valueChanged();
 }
 
+void FileChooser::loadIcon()
+{
+    m_icon = Icon::createIconForFiles(m_filenames);
+    // If synchronous icon loading failed, try asynchronous loading.
+    if (!m_icon && m_filenames.size() && m_client)
+        m_client->iconForFiles(m_filenames);
+}
+
+void FileChooser::iconLoaded(PassRefPtr<Icon> icon)
+{
+    m_icon = icon;
+    if (m_icon && m_client)
+        m_client->repaint();
+}
+
 }
index 0764a6a..e7feb3e 100644 (file)
@@ -41,8 +41,10 @@ class Icon;
 class FileChooserClient {
 public:
     virtual void valueChanged() = 0;
+    virtual void repaint() = 0;
     virtual bool allowsMultipleFiles() = 0;
     virtual String acceptTypes() = 0;
+    virtual void iconForFiles(const Vector<String>&) = 0;
     virtual ~FileChooserClient();
 };
 
@@ -63,13 +65,16 @@ public:
 
     void chooseFile(const String& path);
     void chooseFiles(const Vector<String>& paths);
-    
+    // Called when FileChooserClient finishes to load an icon requested by iconForFiles().
+    void iconLoaded(PassRefPtr<Icon>);
+
     bool allowsMultipleFiles() const { return m_client ? m_client->allowsMultipleFiles() : false; }
     // Acceptable MIME types.  It's an 'accept' attribute value of the corresponding INPUT element.
     String acceptTypes() const { return m_client ? m_client->acceptTypes() : String(); }
 
 private:
     FileChooser(FileChooserClient*, const Vector<String>& initialFilenames);
+    void loadIcon();
 
     FileChooserClient* m_client;
     Vector<String> m_filenames;
index d7d694a..e9f2dc7 100644 (file)
@@ -51,6 +51,8 @@ class String;
     
 class Icon : public RefCounted<Icon> {
 public:
+    // Deprecated.  This function will be removed.
+    // FIXME: Remove it when all implementations are moved to ChromeClient::iconForFiles().
     static PassRefPtr<Icon> createIconForFiles(const Vector<String>& filenames);
 
     ~Icon();
index 3563a59..71b897e 100644 (file)
@@ -87,6 +87,7 @@ static String lookupIconName(String MIMEType)
     return GTK_STOCK_FILE;
 }
 
+// FIXME: Move the code to ChromeClient::iconForFiles().
 PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
 {
     if (filenames.isEmpty())
index aee7234..bc8c312 100644 (file)
@@ -39,6 +39,7 @@ Icon::~Icon()
 {
 }
 
+// FIXME: Move the code to ChromeClient::iconForFiles().
 PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
 {
     if (filenames.isEmpty())
index a9870fc..eb09eda 100644 (file)
@@ -40,6 +40,7 @@ Icon::~Icon()
 {
 }
 
+// FIXME: Move the code to ChromeClient::iconForFiles().
 PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
 {
     if (filenames.isEmpty())
index 56b46de..cc9343a 100644 (file)
@@ -47,6 +47,7 @@ Icon::~Icon()
     DestroyIcon(m_hIcon);
 }
 
+// FIXME: Move the code to ChromeClient::iconForFiles().
 PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
 {
     if (filenames.isEmpty())
index 59cbacf..a31442a 100644 (file)
@@ -114,15 +114,27 @@ String RenderFileUploadControl::acceptTypes()
     return static_cast<HTMLInputElement*>(node())->accept();
 }
 
+void RenderFileUploadControl::iconForFiles(const Vector<String>& filenames)
+{
+    if (Chrome* chromePointer = chrome())
+        chromePointer->iconForFiles(filenames, m_fileChooser);
+}
+
 void RenderFileUploadControl::click()
 {
+    if (Chrome* chromePointer = chrome())
+        chromePointer->runOpenPanel(node()->document()->frame(), m_fileChooser);
+}
+
+Chrome* RenderFileUploadControl::chrome() const
+{
     Frame* frame = node()->document()->frame();
     if (!frame)
-        return;
+        return 0;
     Page* page = frame->page();
     if (!page)
-        return;
-    page->chrome()->runOpenPanel(frame, m_fileChooser);
+        return 0;
+    return page->chrome();
 }
 
 void RenderFileUploadControl::updateFromElement()
index dcdce4d..454041a 100644 (file)
@@ -26,6 +26,7 @@
 
 namespace WebCore {
 
+class Chrome;
 class HTMLInputElement;
     
 // Each RenderFileUploadControl contains a RenderButton (for opening the file chooser), and
@@ -41,16 +42,11 @@ public:
 
     void click();
 
-    void valueChanged();
-    
     void receiveDroppedFiles(const Vector<String>&);
 
     String buttonValue();
     String fileTextValue() const;
     
-    bool allowsMultipleFiles();
-    String acceptTypes();
-
 private:
     virtual const char* renderName() const { return "RenderFileUploadControl"; }
 
@@ -60,6 +56,14 @@ private:
 
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 
+    // FileChooserClient methods.
+    void valueChanged();
+    void repaint() { RenderBlock::repaint(); }
+    bool allowsMultipleFiles();
+    String acceptTypes();
+    void iconForFiles(const Vector<String>&);
+
+    Chrome* chrome() const;
     int maxFilenameWidth() const;
     PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) const;
 
index 6954369..586c492 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::iconForFiles):
+        * src/ChromeClientImpl.h:
+
 2010-02-17  Kenneth Russell  <kbr@google.com>
 
         Reviewed by Oliver Hunt.
index 5d58934..6e5bfc2 100644 (file)
@@ -580,6 +580,11 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh
     chooserCompletion->didChooseFile(WebVector<WebString>());
 }
 
+void ChromeClientImpl::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>)
+{
+    notImplemented();
+}
+
 void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
                                    const IntRect& bounds,
                                    bool activatable,
index ad57203..3a4035b 100644 (file)
@@ -123,6 +123,7 @@ public:
 #endif
     virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
     virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+    virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>);
     virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
     virtual void formStateDidChange(const WebCore::Node*);
     virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
index 417a10a..842587d 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::iconForFiles):
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2010-02-17  Xan Lopez  <xlopez@igalia.com>
 
         Reviewed by Gustavo Noronha.
index feffadb..74f5e07 100644 (file)
@@ -563,6 +563,12 @@ void ChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser)
     gtk_widget_destroy(dialog);
 }
 
+void ChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>)
+{
+    // FIXME: Move the code in Icon::createIconForFiles() here.
+    notImplemented();
+}
+
 bool ChromeClient::setCursor(PlatformCursorHandle)
 {
     notImplemented();
index beb7a08..7e407d3 100644 (file)
@@ -107,6 +107,7 @@ namespace WebKit {
         virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
 #endif
         virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+        virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>);
 
         virtual void formStateDidChange(const WebCore::Node*) { }
 
index 2aa4ad7..03fa61b 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebCoreSupport/ChromeClientHaiku.cpp:
+        (WebCore::ChromeClientHaiku::iconForFiles):
+        * WebCoreSupport/ChromeClientHaiku.h:
+
 2009-12-06  Maxime Simon  <simon.maxime@gmail.com>
 
         Reviewed by Adam Barth.
index 24f0b52..a7f1145 100644 (file)
@@ -346,6 +346,11 @@ void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr<FileChooser>)
     notImplemented();
 }
 
+void ChromeClientHaiku::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>)
+{
+    notImplemented();
+}
+
 bool ChromeClientHaiku::setCursor(PlatformCursorHandle)
 {
     notImplemented();
index ecd66de..3b0841b 100644 (file)
@@ -134,6 +134,7 @@ namespace WebCore {
         void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
 
         void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+        void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
 
         bool setCursor(PlatformCursorHandle);
 
index e77f5c2..1b4ba65 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::iconForFiles):
+
 2010-02-17  Timothy Hatcher  <timothy@apple.com>
 
         Add a way for WebView and its dependancies to be selectively included
index 66381a4..25bacdf 100644 (file)
@@ -120,6 +120,7 @@ public:
 #endif
 
     virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+    virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>);
 
     virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
 
index c4e9671..b2240d9 100644 (file)
@@ -631,6 +631,11 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser)
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
+void WebChromeClient::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>)
+{
+    // FIXME: Move the code of Icon::createIconForFiles() here.
+}
+
 KeyboardUIMode WebChromeClient::keyboardUIMode()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
index b3ece42..cee97f9 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::iconForFiles):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2010-02-17  Diego Gonzalez  <diego.gonzalez@openbossa.org>
 
         Reviewed by Ariya Hidayat.
index 893a1b7..ecbabe4 100644 (file)
@@ -463,6 +463,12 @@ void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileC
     }
 }
 
+void ChromeClientQt::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>)
+{
+    // FIXME: Move the code of Icon::createIconForFiles() here.
+    notImplemented();
+}
+
 bool ChromeClientQt::setCursor(PlatformCursorHandle)
 {
     notImplemented();
index 6b3017d..3d5cbe9 100644 (file)
@@ -138,6 +138,7 @@ namespace WebCore {
 #endif
 
         virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+        virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
 
         virtual void formStateDidChange(const Node*) { }
 
index 82d8863..f2133aa 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::iconForFiles):
+        * WebCoreSupport/WebChromeClient.h:
+
 2010-02-17  Shinichiro Hamaji  <hamaji@chromium.org>
 
         Unreviewed. Touch WebKit.idl to fix the build.
index a1bb3a8..45f7662 100644 (file)
@@ -734,6 +734,12 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChoose
     // FIXME: Show some sort of error if too many files are selected and the buffer is too small.  For now, this will fail silently.
 }
 
+void WebChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>)
+{
+    // FIXME: Move the code of Icon::createIconForFiles() here.
+    notImplemented();
+}
+
 bool WebChromeClient::setCursor(PlatformCursorHandle cursor)
 {
     if (!cursor)
index 5198e7c..0958cf7 100644 (file)
@@ -123,6 +123,7 @@ public:
     virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&);
 
     virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
+    virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>);
 
     virtual bool setCursor(WebCore::PlatformCursorHandle cursor);
 
index 05efbd2..158d620 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-17  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Introduces new Icon loading interface in order to support
+        asynchronous loading.
+        https://bugs.webkit.org/show_bug.cgi?id=32054
+
+        Add an empty implementation of ChromeClient::iconForFiles().
+
+        * WebKitSupport/ChromeClientWx.cpp:
+        (WebCore::ChromeClientWx::iconForFiles):
+        * WebKitSupport/ChromeClientWx.h:
+
 2010-02-04  Kevin Ollivier  <kevino@theolliviers.com>
 
         Build fix after changes in r54345.
index 4d524bc..ac25daf 100644 (file)
@@ -431,6 +431,11 @@ void ChromeClientWx::runOpenPanel(Frame*, PassRefPtr<FileChooser>)
     notImplemented();
 }
 
+void ChromeClientWx::iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>)
+{
+    notImplemented();
+}
+
 bool ChromeClientWx::setCursor(PlatformCursorHandle)
 {
     notImplemented();
index bd4f1ec..71ae48d 100644 (file)
@@ -125,6 +125,7 @@ public:
 #endif
 
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+    virtual void iconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
 
     virtual void formStateDidChange(const Node*) { }