Bug 51784 - Some renaming and refactoring of form element code
Summary: Some renaming and refactoring of form element code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-31 12:18 PST by Darin Adler
Modified: 2010-12-31 16:58 PST (History)
3 users (show)

See Also:


Attachments
Patch (27.51 KB, patch)
2010-12-31 14:12 PST, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-12-31 12:18:20 PST
Some renaming and refactoring of form element code
Comment 1 Darin Adler 2010-12-31 14:12:20 PST
Created attachment 77733 [details]
Patch
Comment 2 mitz 2010-12-31 14:26:10 PST
Comment on attachment 77733 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=77733&action=review

> WebCore/html/HTMLFormElement.cpp:629
> +    HTMLFormControlElement* aliasElement = elementForAlias(name);
> +    if (aliasElement) {

I’d move the definition of aliasElement into the if statement, since it doesn’t seem to be used outside of it.
Comment 3 Adam Barth 2010-12-31 14:30:25 PST
Comment on attachment 77733 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=77733&action=review

A nice improvement.  Thanks.

> WebCore/html/HTMLFormElement.cpp:667
> +bool HTMLFormElement::autoComplete() const
> +{
> +    return !equalIgnoringCase(fastGetAttribute(autocompleteAttr), "off");
> +}

I take you don't think the caching is worthwhile.  Probably true.

> WebCore/html/HTMLSelectElement.cpp:197
> +    listItems()[listIndex]->remove(ec);

Woah, that works?  Cool.
Comment 4 Adam Barth 2010-12-31 16:03:57 PST
Comment on attachment 77733 [details]
Patch

Actually, that variable is used outside the if.
Comment 5 WebKit Commit Bot 2010-12-31 16:58:38 PST
Comment on attachment 77733 [details]
Patch

Clearing flags on attachment: 77733

Committed r74841: <http://trac.webkit.org/changeset/74841>
Comment 6 WebKit Commit Bot 2010-12-31 16:58:45 PST
All reviewed patches have been landed.  Closing bug.