Changeset 56824 in webkit
- Timestamp:
- Mar 30, 2010 9:35:40 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r56821 r56824 1 2010-03-30 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Brady Eidson. 4 5 REGRESSION (r56439) - Crash when a renderer for a file upload control 6 with a selected file is recreated 7 https://bugs.webkit.org/show_bug.cgi?id=36723 8 9 * fast/forms/input-file-re-render.html: 10 Force to do re-layout to check the regression. 11 1 12 2010-03-30 Yuzo Fujishima <yuzo@google.com> 2 13 -
trunk/LayoutTests/fast/forms/input-file-re-render.html
r50868 r56824 19 19 // Delete the renderer. 20 20 input.style.display = 'none'; 21 input.offsetWidth; // Force to do layout 21 22 22 23 // Attach a renderer again. -
trunk/WebCore/ChangeLog
r56822 r56824 1 2010-03-30 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Brady Eidson. 4 5 REGRESSION (r56439) - Crash when a renderer for a file upload control 6 with a selected file is recreated 7 https://bugs.webkit.org/show_bug.cgi?id=36723 8 9 RenderFileUploadControl::chooseIconForFiles was called before 10 m_fileChooser was initialized. 11 12 * platform/FileChooser.cpp: 13 (WebCore::FileChooser::FileChooser): Introduce m_isInitializing flag to 14 avoid FileChooserClient::repaint() call. 15 (WebCore::FileChooser::loadIcon): 16 (WebCore::FileChooser::iconLoaded): 17 * platform/FileChooser.h: Add a FielChooser parameter to 18 FileChooserClient::chooseIconForFiles(). 19 * rendering/RenderFileUploadControl.cpp: 20 (WebCore::RenderFileUploadControl::chooseIconForFiles): 21 (WebCore::RenderFileUploadControl::paintObject): Add an assertion. 22 * rendering/RenderFileUploadControl.h: 23 1 24 2010-03-30 Stanislav Paltis <Stanislav.Paltis@nokia.com> 2 25 -
trunk/WebCore/platform/FileChooser.cpp
r56439 r56824 40 40 inline FileChooser::FileChooser(FileChooserClient* client, const Vector<String>& initialFilenames) 41 41 : m_client(client) 42 , m_isInitializing(true) 42 43 { 43 44 m_filenames = initialFilenames; 44 45 loadIcon(); 46 m_isInitializing = false; 45 47 } 46 48 … … 80 82 { 81 83 if (m_filenames.size() && m_client) 82 m_client->chooseIconForFiles( m_filenames);84 m_client->chooseIconForFiles(this, m_filenames); 83 85 } 84 86 … … 86 88 { 87 89 m_icon = icon; 88 if ( m_icon && m_client)90 if (!m_isInitializing && m_icon && m_client) 89 91 m_client->repaint(); 90 92 } -
trunk/WebCore/platform/FileChooser.h
r56439 r56824 36 36 namespace WebCore { 37 37 38 class FileChooser; 38 39 class Font; 39 40 class Icon; … … 45 46 virtual bool allowsMultipleFiles() = 0; 46 47 virtual String acceptTypes() = 0; 47 virtual void chooseIconForFiles( const Vector<String>&) = 0;48 virtual void chooseIconForFiles(FileChooser*, const Vector<String>&) = 0; 48 49 virtual ~FileChooserClient(); 49 50 }; … … 80 81 Vector<String> m_filenames; 81 82 RefPtr<Icon> m_icon; 83 bool m_isInitializing; 82 84 }; 83 85 -
trunk/WebCore/rendering/RenderFileUploadControl.cpp
r56439 r56824 115 115 } 116 116 117 void RenderFileUploadControl::chooseIconForFiles( const Vector<String>& filenames)117 void RenderFileUploadControl::chooseIconForFiles(FileChooser* chooser, const Vector<String>& filenames) 118 118 { 119 119 if (Chrome* chromePointer = chrome()) 120 chromePointer->chooseIconForFiles(filenames, m_fileChooser);120 chromePointer->chooseIconForFiles(filenames, chooser); 121 121 } 122 122 … … 196 196 if (style()->visibility() != VISIBLE) 197 197 return; 198 ASSERT(m_fileChooser); 198 199 199 200 // Push a clip. -
trunk/WebCore/rendering/RenderFileUploadControl.h
r56439 r56824 62 62 bool allowsMultipleFiles(); 63 63 String acceptTypes(); 64 void chooseIconForFiles( const Vector<String>&);64 void chooseIconForFiles(FileChooser*, const Vector<String>&); 65 65 66 66 Chrome* chrome() const;
Note: See TracChangeset
for help on using the changeset viewer.