Bug 74998 - Change the item type of Document::m_formElementsWithState from Element* to HTMLFormControlElementWithState*
Summary: Change the item type of Document::m_formElementsWithState from Element* to HT...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-20 23:58 PST by Kent Tamura
Modified: 2011-12-21 20:58 PST (History)
2 users (show)

See Also:


Attachments
Patch (8.55 KB, patch)
2011-12-21 00:14 PST, Kent Tamura
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-12-20 23:58:58 PST
Pointed out by Darin Adler in https://bugs.webkit.org/show_bug.cgi?id=74909#c4

> - Document::m_formElementsWithState should change to hold HTMLFormControlElement* instead of Element*, and all the functions should likewise change. I think the looser type is a remnant of WML support.
Comment 1 Kent Tamura 2011-12-21 00:14:50 PST
Created attachment 120155 [details]
Patch
Comment 2 Andreas Kling 2011-12-21 10:47:43 PST
Comment on attachment 120155 [details]
Patch

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

Love it!

> Source/WebCore/dom/Document.cpp:4319
>          String value;
>          if (!elementWithState->shouldSaveAndRestoreFormControlState())
>              continue;

Unrelated to this patch, but we should move "String value;" below the continue to avoid creating the empty string unnecessarily.
Comment 3 Kent Tamura 2011-12-21 20:39:36 PST
Thank you for reviewing.  I'll move "String value" and land the patch.

(In reply to comment #2)
> > Source/WebCore/dom/Document.cpp:4319
> >          String value;
> >          if (!elementWithState->shouldSaveAndRestoreFormControlState())
> >              continue;
> 
> Unrelated to this patch, but we should move "String value;" below the continue to avoid creating the empty string unnecessarily.
Comment 4 Kent Tamura 2011-12-21 20:58:05 PST
Committed r103491: <http://trac.webkit.org/changeset/103491>