Summary: | [BlackBerry] AutofillManager implementation upstream | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Dong <jonathan.dong.webkit> | ||||||||||||||
Component: | WebKit BlackBerry | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | charles.wei, leo.yang, mstaikos, rakuco, rwlbuis, staikos, tonikitoo, webkit.review.bot | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | 85575 | ||||||||||||||||
Bug Blocks: | 85577 | ||||||||||||||||
Attachments: |
|
Description
Jonathan Dong
2012-05-03 21:13:35 PDT
Created attachment 140460 [details]
Patch
Comment on attachment 140460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140460&action=review This can be cleaned up some more. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:26 > +class String; Indent here, this is WebKit style. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:31 > +class WebPagePrivate; Ditto. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:37 > +class HTMLInputElement; The whole block in namespace should be indented. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:50 > + AutofillManager(BlackBerry::WebKit::WebPagePrivate* page):m_webPagePrivate(page), m_element(0) { } Watch the ':', it should have space characters around it. Comment on attachment 140460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140460&action=review >> Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:37 >> +class HTMLInputElement; > > The whole block in namespace should be indented. Thanks Rob, for those indentation things, I guess many of our porting's codes are not following this guideline, especially in WebKit/blackberry. Do we need to fix them when we are about to make some changes? Anyway I'll follow your suggestion with my next patch. (In reply to comment #3) > (From update of attachment 140460 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140460&action=review > > >> Source/WebKit/blackberry/WebCoreSupport/AutofillManager.h:37 > >> +class HTMLInputElement; > > > > The whole block in namespace should be indented. > > Thanks Rob, for those indentation things, I guess many of our porting's codes are not following this guideline, especially in WebKit/blackberry. Do we need to fix them when we are about to make some changes? > Anyway I'll follow your suggestion with my next patch. oh, the changes with the indentation in namespace are rejected by check-webkit-style, and I also checked the coding style of webkit.org in http://www.webkit.org/coding/coding-style.html which implies that we should not indent in this situation. Created attachment 140625 [details]
Patch
Comment on attachment 140625 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140625&action=review Looks good, can be improved some more. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:45 > + Vector<String> candidates = autofillBackingStore().get(element->getAttribute("name").string(), element->value()); Can you use HTMLNames::nameAttr here? Also is this line needed since you are not using candidates. > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:66 > + || element->isAutofilled() || !element->shouldAutocomplete()) You are doing these checks here and in didChangeInTextField, can you make a static function for this in this .cpp? > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:68 > + autofillBackingStore().add(element->getAttribute("name").string(), element->value()); Can you use HTMLNames::nameAttr here? Created attachment 140642 [details]
Patch
Comment on attachment 140642 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140642&action=review Sorry, needs one more iteration :) > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:31 > +static bool isNotAutofillable(HTMLInputElement* element) I think this is better to reverse this logic, ie. make it isAutofillable, and test for ! isNotAutofillable(). (In reply to comment #8) > (From update of attachment 140642 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140642&action=review > > Sorry, needs one more iteration :) > > > Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:31 > > +static bool isNotAutofillable(HTMLInputElement* element) > > I think this is better to reverse this logic, ie. make it isAutofillable, and test for ! isNotAutofillable(). Sorry I meant test for !isAutofillable() Comment on attachment 140642 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140642&action=review >>> Source/WebKit/blackberry/WebCoreSupport/AutofillManager.cpp:31 >>> +static bool isNotAutofillable(HTMLInputElement* element) >> >> I think this is better to reverse this logic, ie. make it isAutofillable, and test for ! isNotAutofillable(). > > Sorry I meant test for !isAutofillable() thanks, will fix soon. :) Created attachment 140649 [details]
Patch
Comment on attachment 140649 [details]
Patch
I like it!
Comment on attachment 140649 [details] Patch Rejecting attachment 140649 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebKit/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/12650264 Created attachment 140673 [details]
Patch
Comment on attachment 140673 [details] Patch Rejecting attachment 140673 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebKit/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/12644374 Created attachment 140677 [details]
Patch
Comment on attachment 140677 [details]
Patch
Help to commit which was already reviewed by Rob.
Comment on attachment 140677 [details] Patch Clearing flags on attachment: 140677 Committed r116400: <http://trac.webkit.org/changeset/116400> All reviewed patches have been landed. Closing bug. |