Bug 89628

Summary: Make FormControlState capable to store multiple values
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, jberlin, kinuko, marja, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 23346, 89623, 89847    
Attachments:
Description Flags
Patch none

Description Kent Tamura 2012-06-20 18:44:55 PDT
FileInputType::saveFormControlState:

    // FIXME: FormControlState should be capable to have multiple strings and we
    // should stop the following ugly string concatenation.
    StringBuilder result;
    unsigned numFiles = m_fileList->length();
    for (unsigned i = 0; i < numFiles; ++i) {
        result.append(m_fileList->item(i)->path());
        result.append('\1');
        result.append(m_fileList->item(i)->name());
        result.append('\0');
    }

We resolve this FIXME in this bug.
Comment 1 Kent Tamura 2012-06-20 20:19:03 PDT
Created attachment 148719 [details]
Patch
Comment 2 WebKit Review Bot 2012-06-21 22:36:44 PDT
Comment on attachment 148719 [details]
Patch

Clearing flags on attachment: 148719

Committed r121004: <http://trac.webkit.org/changeset/121004>
Comment 3 WebKit Review Bot 2012-06-21 22:36:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Jessie Berlin 2012-06-22 09:49:32 PDT
(In reply to comment #2)
> (From update of attachment 148719 [details])
> Clearing flags on attachment: 148719
> 
> Committed r121004: <http://trac.webkit.org/changeset/121004>

This broke the i386 build:

Source/WebCore/html/FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
    state.m_values.reserveCapacity(valueSize);
    ~~~~~                          ^~~~~~~~~
Comment 5 David Kilzer (:ddkilzer) 2012-06-22 09:50:33 PDT
(In reply to comment #2)
> (From update of attachment 148719 [details])
> Clearing flags on attachment: 148719
> 
> Committed r121004: <http://trac.webkit.org/changeset/121004>

This caused a build failure on 32-bit architectures.  Follow-up build fix in r121032.

<http://trac.webkit.org/changeset/121032>
Comment 6 Kent Tamura 2012-06-24 17:30:01 PDT
(In reply to comment #5)
> > Committed r121004: <http://trac.webkit.org/changeset/121004>
> 
> This caused a build failure on 32-bit architectures.  Follow-up build fix in r121032.
> 
> <http://trac.webkit.org/changeset/121032>

Thank you for the fix!
We should have a 32 bit EWS.