Title: [141055] trunk/Source/WebKit/chromium
Revision
141055
Author
[email protected]
Date
2013-01-28 22:35:58 -0800 (Mon, 28 Jan 2013)

Log Message

Expose isRadioButton and isCheckbox API in chromium-webkit glue layer.
https://bugs.webkit.org/show_bug.cgi?id=108031

Patch by Raman Kumar <[email protected]> on 2013-01-28
Reviewed by Adam Barth.

In chromium, to know if an InputElement is radiobutton or a checkbox,
we are checking for formControlType (a string comparision), which is
very slow. Exposing these API to chromium will make them faster.

* public/WebInputElement.h:
(WebInputElement):
* src/WebInputElement.cpp:
(WebKit::WebInputElement::isRadioButton):
(WebKit):
(WebKit::WebInputElement::isCheckbox):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (141054 => 141055)


--- trunk/Source/WebKit/chromium/ChangeLog	2013-01-29 06:22:28 UTC (rev 141054)
+++ trunk/Source/WebKit/chromium/ChangeLog	2013-01-29 06:35:58 UTC (rev 141055)
@@ -1,3 +1,21 @@
+2013-01-28  Raman Kumar  <[email protected]>
+
+        Expose isRadioButton and isCheckbox API in chromium-webkit glue layer.
+        https://bugs.webkit.org/show_bug.cgi?id=108031
+
+        Reviewed by Adam Barth.
+
+        In chromium, to know if an InputElement is radiobutton or a checkbox,
+        we are checking for formControlType (a string comparision), which is
+        very slow. Exposing these API to chromium will make them faster.
+
+        * public/WebInputElement.h:
+        (WebInputElement):
+        * src/WebInputElement.cpp:
+        (WebKit::WebInputElement::isRadioButton):
+        (WebKit):
+        (WebKit::WebInputElement::isCheckbox):
+
 2013-01-28  Alexandre Elias  <[email protected]>
 
         Make page scale shrink FrameView in applyPageScaleInCompositor mode

Modified: trunk/Source/WebKit/chromium/public/WebInputElement.h (141054 => 141055)


--- trunk/Source/WebKit/chromium/public/WebInputElement.h	2013-01-29 06:22:28 UTC (rev 141054)
+++ trunk/Source/WebKit/chromium/public/WebInputElement.h	2013-01-29 06:35:58 UTC (rev 141055)
@@ -68,6 +68,8 @@
         WEBKIT_EXPORT bool isText() const;
         WEBKIT_EXPORT bool isPasswordField() const;
         WEBKIT_EXPORT bool isImageButton() const;
+        WEBKIT_EXPORT bool isRadioButton() const;
+        WEBKIT_EXPORT bool isCheckbox() const;
         WEBKIT_EXPORT bool autoComplete() const;
         WEBKIT_EXPORT int maxLength() const;
         WEBKIT_EXPORT bool isActivatedSubmit() const;

Modified: trunk/Source/WebKit/chromium/src/WebInputElement.cpp (141054 => 141055)


--- trunk/Source/WebKit/chromium/src/WebInputElement.cpp	2013-01-29 06:22:28 UTC (rev 141054)
+++ trunk/Source/WebKit/chromium/src/WebInputElement.cpp	2013-01-29 06:35:58 UTC (rev 141055)
@@ -68,6 +68,16 @@
     return constUnwrap<HTMLInputElement>()->isImageButton();
 }
 
+bool WebInputElement::isRadioButton() const
+{
+    return constUnwrap<HTMLInputElement>()->isRadioButton();
+}
+
+bool WebInputElement::isCheckbox() const
+{
+    return constUnwrap<HTMLInputElement>()->isCheckbox();
+}
+
 bool WebInputElement::autoComplete() const
 {
     return constUnwrap<HTMLInputElement>()->shouldAutocomplete();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to