Title: [102873] trunk/Source/WebKit/chromium
Revision
102873
Author
[email protected]
Date
2011-12-14 19:39:51 -0800 (Wed, 14 Dec 2011)

Log Message

[Chromium] Implement PluginViewBase::getFormValue
https://bugs.webkit.org/show_bug.cgi?id=64434

Adds getFormValue() to WebPluginContainerImpl as an implementation of PluginViewBase::getFormValue().

Reviewed by Darin Fisher.

No new tests. No behavior change at this time. We should add a test for PPAPI after chromium supports the feature.

* public/WebPlugin.h: Added getFormValue().
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::getFormValue): Added.
* src/WebPluginContainerImpl.h: Added getFormValue().

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (102872 => 102873)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-12-15 03:24:55 UTC (rev 102872)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-12-15 03:39:51 UTC (rev 102873)
@@ -1,3 +1,19 @@
+2011-12-14  Kenichi Ishibashi  <[email protected]>
+
+        [Chromium] Implement PluginViewBase::getFormValue
+        https://bugs.webkit.org/show_bug.cgi?id=64434
+
+        Adds getFormValue() to WebPluginContainerImpl as an implementation of PluginViewBase::getFormValue().
+
+        Reviewed by Darin Fisher.
+
+        No new tests. No behavior change at this time. We should add a test for PPAPI after chromium supports the feature.
+
+        * public/WebPlugin.h: Added getFormValue().
+        * src/WebPluginContainerImpl.cpp:
+        (WebKit::WebPluginContainerImpl::getFormValue): Added.
+        * src/WebPluginContainerImpl.h: Added getFormValue().
+
 2011-12-14  Sami Kyostila  <[email protected]>
 
         [chromium] Fix CCLayerTreeHostTest shutdown race

Modified: trunk/Source/WebKit/chromium/public/WebPlugin.h (102872 => 102873)


--- trunk/Source/WebKit/chromium/public/WebPlugin.h	2011-12-15 03:24:55 UTC (rev 102872)
+++ trunk/Source/WebKit/chromium/public/WebPlugin.h	2011-12-15 03:39:51 UTC (rev 102873)
@@ -58,6 +58,11 @@
 
     virtual NPObject* scriptableObject() = 0;
 
+    // Returns true if the form submission value is successfully obtained
+    // from the plugin. The value would be associated with the name attribute
+    // of the corresponding object element.
+    virtual bool getFormValue(WebString&) { return false; }
+
     virtual void paint(WebCanvas*, const WebRect&) = 0;
 
     // Coordinates are relative to the containing window.

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (102872 => 102873)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2011-12-15 03:24:55 UTC (rev 102872)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2011-12-15 03:39:51 UTC (rev 102873)
@@ -464,6 +464,16 @@
     return m_webPlugin->scriptableObject();
 }
 
+bool WebPluginContainerImpl::getFormValue(String& value)
+{
+    WebString webValue;
+    if (m_webPlugin->getFormValue(webValue)) {
+        value = webValue;
+        return true;
+    }
+    return false;
+}
+
 void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer)
 {
     size_t pos = m_pluginLoadObservers.find(observer);

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h (102872 => 102873)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h	2011-12-15 03:24:55 UTC (rev 102872)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h	2011-12-15 03:39:51 UTC (rev 102873)
@@ -38,6 +38,7 @@
 #include <wtf/OwnPtr.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
 
 struct NPObject;
 
@@ -70,6 +71,9 @@
         return adoptRef(new WebPluginContainerImpl(element, webPlugin));
     }
 
+    // PluginViewBase methods
+    virtual bool getFormValue(String&);
+
     // Widget methods
     virtual void setFrameRect(const WebCore::IntRect&);
     virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to