Title: [135016] trunk/Source/WebKit/chromium
Revision
135016
Author
commit-qu...@webkit.org
Date
2012-11-16 16:31:28 -0800 (Fri, 16 Nov 2012)

Log Message

Add setChecked API in WebInputElement
https://bugs.webkit.org/show_bug.cgi?id=102422

Patch by Raman Kumar <rama...@chromium.org> on 2012-11-16
Reviewed by Adam Barth.

* public/WebInputElement.h:
(WebInputElement): Add setChecked(bool, bool) API
* src/WebInputElement.cpp:
(WebKit::WebInputElement::setChecked): Implement setChecked by calling
underlying HTMLInputElement's setChecked.
(WebKit):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (135015 => 135016)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-11-17 00:25:57 UTC (rev 135015)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-11-17 00:31:28 UTC (rev 135016)
@@ -1,3 +1,17 @@
+2012-11-16  Raman Kumar  <rama...@chromium.org>
+
+        Add setChecked API in WebInputElement
+        https://bugs.webkit.org/show_bug.cgi?id=102422
+
+        Reviewed by Adam Barth.
+
+        * public/WebInputElement.h:
+        (WebInputElement): Add setChecked(bool, bool) API
+        * src/WebInputElement.cpp:
+        (WebKit::WebInputElement::setChecked): Implement setChecked by calling
+        underlying HTMLInputElement's setChecked.
+        (WebKit):
+
 2012-11-16  Tony Chang  <t...@chromium.org>
 
         Remove ENABLE_CSS_HIERARCHIES since it's no longer in use

Modified: trunk/Source/WebKit/chromium/public/WebInputElement.h (135015 => 135016)


--- trunk/Source/WebKit/chromium/public/WebInputElement.h	2012-11-17 00:25:57 UTC (rev 135015)
+++ trunk/Source/WebKit/chromium/public/WebInputElement.h	2012-11-17 00:31:28 UTC (rev 135016)
@@ -74,6 +74,7 @@
         WEBKIT_EXPORT void setActivatedSubmit(bool);
         WEBKIT_EXPORT int size() const;
         WEBKIT_EXPORT void setValue(const WebString&, bool sendChangeEvent = false);
+        WEBKIT_EXPORT void setChecked(bool, bool sendChangeEvent = false);
         WEBKIT_EXPORT WebString value() const;
         // This returns the non-sanitized, exact value inside the text field.
         WEBKIT_EXPORT WebString editingValue() const;

Modified: trunk/Source/WebKit/chromium/src/WebInputElement.cpp (135015 => 135016)


--- trunk/Source/WebKit/chromium/src/WebInputElement.cpp	2012-11-17 00:25:57 UTC (rev 135015)
+++ trunk/Source/WebKit/chromium/src/WebInputElement.cpp	2012-11-17 00:31:28 UTC (rev 135016)
@@ -163,6 +163,11 @@
     return constUnwrap<HTMLInputElement>()->isValidValue(value);
 }
 
+void WebInputElement::setChecked(bool nowChecked, bool sendChangeEvent)
+{
+    unwrap<HTMLInputElement>()->setChecked(nowChecked, sendChangeEvent ? DispatchChangeEvent : DispatchNoEvent);
+}
+
 bool WebInputElement::isChecked() const
 {
     return constUnwrap<HTMLInputElement>()->checked();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to