Title: [124031] trunk
Revision
124031
Author
[email protected]
Date
2012-07-30 08:54:53 -0700 (Mon, 30 Jul 2012)

Log Message

[BlackBerry] Adapt to changes in the SharedArray platform API
https://bugs.webkit.org/show_bug.cgi?id=92631

Patch by Robin Cao <[email protected]> on 2012-07-30
Reviewed by Rob Buis.

Adapt to changes in the SharedArray platform API. No behavioural change.

Source/WebKit/blackberry:

Reviewed internally by Joe Mason.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::getBackForwardList):
* Api/WebPage.h:
* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::runOpenPanel):

Tools:

* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
(LayoutTestController::webHistoryItemCount):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (124030 => 124031)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-07-30 15:54:53 UTC (rev 124031)
@@ -5391,13 +5391,12 @@
 // Serialize only the members of HistoryItem which are needed by the client,
 // and copy them into a SharedArray. Also include the HistoryItem pointer which
 // will be used by the client as an opaque reference to identify the item.
-void WebPage::getBackForwardList(SharedArray<BackForwardEntry>& result, unsigned int& resultSize) const
+void WebPage::getBackForwardList(SharedArray<BackForwardEntry>& result) const
 {
     HistoryItemVector entries = static_cast<BackForwardListImpl*>(d->m_page->backForward()->client())->entries();
-    resultSize = entries.size();
-    result.reset(new BackForwardEntry[resultSize]);
+    result.reset(new BackForwardEntry[entries.size()], entries.size());
 
-    for (unsigned i = 0; i < resultSize; ++i) {
+    for (unsigned i = 0; i < entries.size(); ++i) {
         RefPtr<HistoryItem> entry = entries[i];
         BackForwardEntry& resultEntry = result[i];
         resultEntry.url = ""

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.h (124030 => 124031)


--- trunk/Source/WebKit/blackberry/Api/WebPage.h	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.h	2012-07-30 15:54:53 UTC (rev 124031)
@@ -299,7 +299,7 @@
     void goToBackForwardEntry(BackForwardId);
 
     int backForwardListLength() const;
-    void getBackForwardList(SharedArray<BackForwardEntry>& result, unsigned& resultLength) const;
+    void getBackForwardList(SharedArray<BackForwardEntry>& result) const;
     void releaseBackForwardEntry(BackForwardId) const;
     void clearBackForwardList(bool keepCurrentPage) const;
 

Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (124030 => 124031)


--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-07-30 15:54:53 UTC (rev 124031)
@@ -167,9 +167,9 @@
     virtual void openDateTimePopup(int type, const WebString& value, const WebString& min, const WebString& max, double step) = 0;
     virtual void openColorPopup(const WebString& value) = 0;
 
-    virtual bool chooseFilenames(bool allowMultiple, const WebString& acceptTypes, const SharedArray<WebString>& initialFiles, unsigned initialFileSize, SharedArray<WebString>& chosenFiles, unsigned& chosenFileSize) = 0;
+    virtual bool chooseFilenames(bool allowMultiple, const WebString& acceptTypes, const SharedArray<WebString>& initialFiles, SharedArray<WebString>& chosenFiles) = 0;
 
-    virtual void loadPluginForMimetype(int, int width, int height, const SharedArray<WebString>& paramNames, const SharedArray<WebString>& paramValues, int size, const char* url) = 0;
+    virtual void loadPluginForMimetype(int, int width, int height, const SharedArray<WebString>& paramNames, const SharedArray<WebString>& paramValues, const char* url) = 0;
     virtual void notifyPluginRectChanged(int, Platform::IntRect rectChanged) = 0;
     virtual void destroyPlugin(int) = 0;
     virtual void playMedia(int) = 0;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (124030 => 124031)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-07-30 15:54:53 UTC (rev 124031)
@@ -1,3 +1,21 @@
+2012-07-30  Robin Cao  <[email protected]>
+
+        [BlackBerry] Adapt to changes in the SharedArray platform API
+        https://bugs.webkit.org/show_bug.cgi?id=92631
+
+        Reviewed by Rob Buis.
+
+        Adapt to changes in the SharedArray platform API. No behavioural change.
+
+        Reviewed internally by Joe Mason.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPage::getBackForwardList):
+        * Api/WebPage.h:
+        * Api/WebPageClient.h:
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::runOpenPanel):
+
 2012-07-30  Patrick Gansterer  <[email protected]>
 
         Replace UnicodeWinCE with UnicodeWchar

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (124030 => 124031)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-07-30 15:54:53 UTC (rev 124031)
@@ -507,26 +507,25 @@
 void ChromeClientBlackBerry::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser)
 {
     SharedArray<WebString> initialFiles;
-    unsigned int initialFileSize = chooser->settings().selectedFiles.size();
-    if (initialFileSize > 0)
-        initialFiles.reset(new WebString[initialFileSize]);
-    for (unsigned i = 0; i < initialFileSize; ++i)
+    unsigned numberOfInitialFiles = chooser->settings().selectedFiles.size();
+    if (numberOfInitialFiles > 0)
+        initialFiles.reset(new WebString[numberOfInitialFiles], numberOfInitialFiles);
+    for (unsigned i = 0; i < numberOfInitialFiles; ++i)
         initialFiles[i] = chooser->settings().selectedFiles[i];
 
     SharedArray<WebString> chosenFiles;
-    unsigned int chosenFileSize;
 
     {
         PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true);
         TimerBase::fireTimersInNestedEventLoop();
 
         // FIXME: Use chooser->settings().acceptMIMETypes instead of WebString() for the second parameter.
-        if (!m_webPagePrivate->m_client->chooseFilenames(chooser->settings().allowsMultipleFiles, WebString(), initialFiles, initialFileSize, chosenFiles, chosenFileSize))
+        if (!m_webPagePrivate->m_client->chooseFilenames(chooser->settings().allowsMultipleFiles, WebString(), initialFiles, chosenFiles))
             return;
     }
 
-    Vector<String> files(chosenFileSize);
-    for (unsigned i = 0; i < chosenFileSize; ++i)
+    Vector<String> files(chosenFiles.length());
+    for (unsigned i = 0; i < chosenFiles.length(); ++i)
         files[i] = chosenFiles[i];
     chooser->chooseFiles(files);
 }

Modified: trunk/Tools/ChangeLog (124030 => 124031)


--- trunk/Tools/ChangeLog	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Tools/ChangeLog	2012-07-30 15:54:53 UTC (rev 124031)
@@ -1,3 +1,15 @@
+2012-07-30  Robin Cao  <[email protected]>
+
+        [BlackBerry] Adapt to changes in the SharedArray platform API
+        https://bugs.webkit.org/show_bug.cgi?id=92631
+
+        Reviewed by Rob Buis.
+
+        Adapt to changes in the SharedArray platform API. No behavioural change.
+
+        * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
+        (LayoutTestController::webHistoryItemCount):
+
 2012-07-30  Balazs Kelemen  <[email protected]>
 
         [Qt][NRWT] REGRESSION(123729): Forcing pixel tests with -p doesn't work

Modified: trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp (124030 => 124031)


--- trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp	2012-07-30 15:47:33 UTC (rev 124030)
+++ trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp	2012-07-30 15:54:53 UTC (rev 124031)
@@ -308,9 +308,8 @@
 size_t LayoutTestController::webHistoryItemCount()
 {
     SharedArray<BlackBerry::WebKit::WebPage::BackForwardEntry> backForwardList;
-    unsigned size;
-    BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->getBackForwardList(backForwardList, size);
-    return size;
+    BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->getBackForwardList(backForwardList);
+    return backForwardList.length();
 }
 
 int LayoutTestController::windowCount()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to