Title: [91975] trunk/Source/WebKit/chromium
Revision
91975
Author
[email protected]
Date
2011-07-28 22:32:24 -0700 (Thu, 28 Jul 2011)

Log Message

[Chromium] Add form() function to access parent WebFormElement from WebFormControlElement.
https://bugs.webkit.org/show_bug.cgi?id=65304
http://code.google.com/p/chromium/issues/detail?id=63553

Patch by Naoki Takano <[email protected]> on 2011-07-28
Reviewed by Darin Fisher.

Chromium Autofill feature needs to access the parent WebFormElement from WebFormControlElement. So added form() method.

* public/WebFormControlElement.h: Add form() function.
* src/WebFormControlElement.cpp:
(WebKit::WebFormControlElement::form): Return parent WebFormElement.

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (91974 => 91975)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-07-29 05:16:22 UTC (rev 91974)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-07-29 05:32:24 UTC (rev 91975)
@@ -1,3 +1,17 @@
+2011-07-28  Naoki Takano  <[email protected]>
+
+        [Chromium] Add form() function to access parent WebFormElement from WebFormControlElement.
+        https://bugs.webkit.org/show_bug.cgi?id=65304
+        http://code.google.com/p/chromium/issues/detail?id=63553
+
+        Reviewed by Darin Fisher.
+
+        Chromium Autofill feature needs to access the parent WebFormElement from WebFormControlElement. So added form() method.
+
+        * public/WebFormControlElement.h: Add form() function.
+        * src/WebFormControlElement.cpp:
+        (WebKit::WebFormControlElement::form): Return parent WebFormElement.
+
 2011-07-28  Nico Weber  <[email protected]>
 
         [chromium] Make WebImage::assign(CGImageRef) a WEBKIT_API

Modified: trunk/Source/WebKit/chromium/public/WebFormControlElement.h (91974 => 91975)


--- trunk/Source/WebKit/chromium/public/WebFormControlElement.h	2011-07-29 05:16:22 UTC (rev 91974)
+++ trunk/Source/WebKit/chromium/public/WebFormControlElement.h	2011-07-29 05:32:24 UTC (rev 91975)
@@ -32,6 +32,7 @@
 #define WebFormControlElement_h
 
 #include "WebElement.h"
+#include "WebFormElement.h"
 #include "WebString.h"
 
 #if WEBKIT_IMPLEMENTATION
@@ -65,6 +66,8 @@
     // string if it has no name and no id.
     WEBKIT_API WebString nameForAutofill() const;
 
+    WEBKIT_API WebFormElement form() const;
+
 #if WEBKIT_IMPLEMENTATION
     WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&);
     WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&);

Modified: trunk/Source/WebKit/chromium/src/WebFormControlElement.cpp (91974 => 91975)


--- trunk/Source/WebKit/chromium/src/WebFormControlElement.cpp	2011-07-29 05:16:22 UTC (rev 91974)
+++ trunk/Source/WebKit/chromium/src/WebFormControlElement.cpp	2011-07-29 05:32:24 UTC (rev 91975)
@@ -32,6 +32,7 @@
 #include "WebFormControlElement.h"
 
 #include "HTMLFormControlElement.h"
+#include "HTMLFormElement.h"
 #include <wtf/PassRefPtr.h>
 
 using namespace WebCore;
@@ -76,6 +77,11 @@
     return String();
 }
 
+WebFormElement WebFormControlElement::form() const
+{
+    return WebFormElement(constUnwrap<HTMLFormControlElement>()->form());
+}
+
 WebFormControlElement::WebFormControlElement(const PassRefPtr<HTMLFormControlElement>& elem)
     : WebElement(elem)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to