RESOLVED FIXED 61791
[GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
https://bugs.webkit.org/show_bug.cgi?id=61791
Summary [GTK] Provide custom DOM bindings methods to check if input/textareas have be...
Xan Lopez
Reported 2011-05-31 10:28:41 PDT
This is useful to implement the usual "do not close this tab, there are unsubmitted forms" warning in browsers.
Attachments
Patch (7.42 KB, patch)
2011-05-31 10:35 PDT, Xan Lopez
no flags
Xan Lopez
Comment 1 2011-05-31 10:35:41 PDT
Xan Lopez
Comment 2 2011-05-31 10:36:33 PDT
Not much I can do about the style warning, the function has to be in C style since it's public API.
WebKit Review Bot
Comment 3 2011-05-31 10:37:38 PDT
Attachment 95450 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:29: webkit_dom_html_text_area_element_is_edited is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:36: webkit_dom_html_input_element_is_edited is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Martin Robinson
Comment 4 2011-05-31 10:45:41 PDT
Comment on attachment 95450 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95450&action=review >> Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:29 >> +gboolean webkit_dom_html_text_area_element_is_edited(WebKitDOMHTMLTextAreaElement* area) > > webkit_dom_html_text_area_element_is_edited is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Why not webkit_dom_html_text_area_element_last_change_was_user_edit?
Martin Robinson
Comment 5 2011-05-31 10:46:13 PDT
(In reply to comment #4) > (From update of attachment 95450 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=95450&action=review > > >> Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:29 > >> +gboolean webkit_dom_html_text_area_element_is_edited(WebKitDOMHTMLTextAreaElement* area) > > > > webkit_dom_html_text_area_element_is_edited is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > > Why not webkit_dom_html_text_area_element_last_change_was_user_edit? Probably this name should be changed before landing, by the way. I think webkit_dom_html_text_area_element_is_edited inaccurately portrays what this method does.
Xan Lopez
Comment 6 2011-05-31 11:10:21 PDT
Comment on attachment 95450 [details] Patch Clearing flags on attachment: 95450 Committed r87741: <http://trac.webkit.org/changeset/87741>
Xan Lopez
Comment 7 2011-05-31 11:10:28 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.