[haiku-webkit-commits] r374 - webkit/trunk/WebKit/haiku/API

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2010 23:13:38 +0000

Author: stippi
Date: Fri Apr  2 23:13:38 2010
New Revision: 374
URL: http://mmlr.dyndns.org/changeset/374

Log:
Simplified iterating over received refs from file panel in BWebPage.

Modified:
   webkit/trunk/WebKit/haiku/API/WebPage.cpp

Modified: webkit/trunk/WebKit/haiku/API/WebPage.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/API/WebPage.cpp   Fri Apr  2 23:05:15 2010        
(r373)
+++ webkit/trunk/WebKit/haiku/API/WebPage.cpp   Fri Apr  2 23:13:38 2010        
(r374)
@@ -919,14 +919,10 @@
     case B_REFS_RECEIVED: {
                RefPtr<FileChooser>* chooser;
         if (message->FindPointer("chooser", 
reinterpret_cast<void**>(&chooser)) == B_OK) {
-            type_code type;
-            int32 count = 0;
             entry_ref ref;
             BPath path;
-            message->GetInfo("refs", &type, &count);
             Vector<String> filenames;
-            for (int32 i = 0; i < count; i++) {
-                message->FindRef("refs", i, &ref);
+            for (int32 i = 0; message->FindRef("refs", i, &ref) == B_OK; i++) {
                 path.SetTo(&ref);
                 filenames.append(String(path.Path()));
             }

Other related posts:

  • » [haiku-webkit-commits] r374 - webkit/trunk/WebKit/haiku/API - webkit