RESOLVED FIXED33751
Frame::matchLabelsAgainstElement should take id attribute into account (as well as name)
https://bugs.webkit.org/show_bug.cgi?id=33751
Summary Frame::matchLabelsAgainstElement should take id attribute into account (as we...
John Sullivan
Reported 2010-01-15 19:01:11 PST
Frame::matchLabelsAgainstElement() is used at least by Safari for trying to guess what kind of data is expected by a form field -- e.g., phone number, street address, zip code, etc. Currently this function only checks the name attribute of the given element. It would do a better job of guessing if it also checked the id attribute when the name attribute check fails.
Attachments
Test case that was reduced from http://www.autotrader.com (71 bytes, text/html)
2010-01-15 19:02 PST, John Sullivan
no flags
Patch for platform-agnostic and Mac versions of the relevant code. (6.58 KB, patch)
2010-01-15 19:10 PST, John Sullivan
no flags
Revised patch that fixes the doubled semicolon. (6.58 KB, patch)
2010-01-15 19:48 PST, John Sullivan
darin: review+
John Sullivan
Comment 1 2010-01-15 19:02:13 PST
Created attachment 46725 [details] Test case that was reduced from http://www.autotrader.com
John Sullivan
Comment 2 2010-01-15 19:05:13 PST
This bug is in radar as 7538330.
John Sullivan
Comment 3 2010-01-15 19:10:39 PST
Created attachment 46726 [details] Patch for platform-agnostic and Mac versions of the relevant code.
WebKit Review Bot
Comment 4 2010-01-15 19:15:31 PST
Attachment 46726 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/page/Frame.cpp:542: More than one command on the same line [whitespace/newline] [4] Total errors found: 1
John Sullivan
Comment 5 2010-01-15 19:48:30 PST
Created attachment 46728 [details] Revised patch that fixes the doubled semicolon.
Darin Adler
Comment 6 2010-01-16 10:42:09 PST
Comment on attachment 46728 [details] Revised patch that fixes the doubled semicolon. I'm not so fond with the name "mutable" in the local variable names here. It's also too bad we have no way to write regression tests for this function. r=me despite that tho
John Sullivan
Comment 7 2010-01-16 17:04:48 PST
Checked in as r53367.
Note You need to log in before you can comment on or make changes to this bug.