Skip to content
  • commit-queue@webkit.org's avatar
    .: FormController, WebHistoryItem: Enable reading selected file names from document state · 2f936c8d
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=91231
    
    Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
    Reviewed by Jochen Eisinger.
    
    This change enables Chromium to set up file permissions properly when
    the session restore feature restores a page with selected files.
    
    * Source/autotools/symbols.filter: Exported FormController::getReferencedFilePaths and HistoryController::saveDocumentAndScrollState.
    
    Source/WebCore: FormController, FileInputType: Enable reading selected file names from document state
    https://bugs.webkit.org/show_bug.cgi?id=91231
    
    Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
    Reviewed by Jochen Eisinger.
    
    This change enables Chromium to set up file permissions properly when
    the session restore feature restores a page with selected files.
    
    Test: fast/forms/file/selected-files-from-history-state.html
    
    * WebCore.exp.in: Exported FormController::getReferencedFilePaths.
    * html/FileInputType.cpp:
    (WebCore::FileInputType::filesFromFormControlState): Added. Extracts FileChooserFileInfos from a FormControlState.
    (WebCore):
    (WebCore::FileInputType::restoreFormControlState): Refactored to use filesFromFormControlState.
    * html/FileInputType.h:
    (FileInputType): Added filesFromFormControlState.
    * html/FormController.cpp:
    (SavedFormState): Added getReferencedFilePaths.
    (WebCore::SavedFormState::getReferencedFilePaths): Added. Extracts selected file paths from SavedFormState.
    (WebCore):
    (WebCore::FormController::setStateForNewFormElements): Refactored to use formStatesFromStateVector.
    (WebCore::FormController::formStatesFromStateVector):
    (WebCore::FormController::getReferencedFilePaths): Added. Static. Extracts selected file paths from a document state.
    * html/FormController.h:
    (FormController): Added getReferencedFilePaths and formStatesFromStateVector.
    * html/HTMLInputElement.cpp:
    (WebCore::HTMLInputElement::filesFromFileInputFormControlState): Added. Delegates to FileInputType::filesFromFormControlState.
    (WebCore):
    * html/HTMLInputElement.h: Added filesFromFileInputFormControlState.
    (HTMLInputElement):
    * testing/Internals.cpp:
    (WebCore::Internals::getReferencedFilePaths): Calls FormController::getReferencedFilePaths.
    (WebCore):
    * testing/Internals.h:
    (Internals): Added getReferencedFilePaths.
    * testing/Internals.idl: Added binding for getReferencedFilePaths.
    
    Source/WebKit/chromium: WebHistoryItem: Enable reading selected file names from document state
    https://bugs.webkit.org/show_bug.cgi?id=91231
    
    Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
    Reviewed by Jochen Eisinger.
    
    This change enables Chromium to set up file permissions properly when
    the session restore feature restores a page with selected files.
    
    * public/WebHistoryItem.h:
    (WebHistoryItem): Added getReferencedFilePaths.
    * src/WebHistoryItem.cpp:
    (WebKit::WebHistoryItem::getReferencedFilePaths): Extracts selected and posted file paths from a document state.
    (WebKit):
    
    Source/WebKit2: FormController, WebHistoryItem: Enable reading selected file names from document state
    https://bugs.webkit.org/show_bug.cgi?id=91231
    
    Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
    Reviewed by Jochen Eisinger.
    
    This change enables Chromium to set up file permissions properly when
    the session restore feature restores a page with selected files.
    
    * win/WebKit2.def: Exported FormController::getReferencedFilePaths and HistoryController::saveDocumentAndScrollState.
    
    LayoutTests: FormController: Enable reading selected file names from document state
    https://bugs.webkit.org/show_bug.cgi?id=91231
    
    Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
    Reviewed by Jochen Eisinger.
    
    This change enables Chromium to set up file permissions properly when
    the session restore feature restores a page with selected files.
    
    * fast/forms/file/selected-files-from-history-state-expected.txt: Added.
    * fast/forms/file/selected-files-from-history-state.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2f936c8d