Changeset 24509 in webkit
- Timestamp:
- Jul 21, 2007 4:41:48 AM (17 years ago)
- Location:
- tags/Safari-5522.12/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-5522.12/WebCore/ChangeLog
r24405 r24509 1 2007-07-20 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Maciej. 4 5 Move FTPDirectoryTokenizer::m_templateDocumentData to be a function-scoped static 6 to avoid creating a global initializer. This fixes the build for x86_64. 7 8 * loader/FTPDirectoryDocument.cpp: 9 (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): 10 1 11 2007-07-18 Maciej Stachowiak <mjs@apple.com> 2 12 -
tags/Safari-5522.12/WebCore/loader/FTPDirectoryDocument.cpp
r24384 r24509 94 94 95 95 ListState m_listState; 96 97 static RefPtr<SharedBuffer> m_templateDocumentData;98 // FIXME: Instead of storing the data, we'd rather actually parse the template data into the template Document once,99 // store that document, then "copy" it whenever we get an FTP directory listing. There are complexities with this100 // approach that make it worth putting this off.101 96 }; 102 103 RefPtr<SharedBuffer> FTPDirectoryTokenizer::m_templateDocumentData;104 97 105 98 FTPDirectoryTokenizer::FTPDirectoryTokenizer(HTMLDocument* doc) … … 303 296 304 297 bool FTPDirectoryTokenizer::loadDocumentTemplate() 305 { 306 if (!m_templateDocumentData) { 298 { 299 static RefPtr<SharedBuffer> templateDocumentData; 300 // FIXME: Instead of storing the data, we'd rather actually parse the template data into the template Document once, 301 // store that document, then "copy" it whenever we get an FTP directory listing. There are complexities with this 302 // approach that make it worth putting this off. 303 304 if (!templateDocumentData) { 307 305 Settings* settings = m_doc->settings(); 308 306 if (settings) 309 m_templateDocumentData = SharedBuffer::createWithContentsOfFile(settings->ftpDirectoryTemplatePath());310 if ( m_templateDocumentData)311 LOG(FTP, "Loaded FTPDirectoryTemplate of length %i\n", m_templateDocumentData->size());312 } 313 314 if (! m_templateDocumentData) {307 templateDocumentData = SharedBuffer::createWithContentsOfFile(settings->ftpDirectoryTemplatePath()); 308 if (templateDocumentData) 309 LOG(FTP, "Loaded FTPDirectoryTemplate of length %i\n", templateDocumentData->size()); 310 } 311 312 if (!templateDocumentData) { 315 313 LOG_ERROR("Could not load templateData"); 316 314 return false; … … 319 317 // Tokenize the template as an HTML document synchronously 320 318 setForceSynchronous(true); 321 HTMLTokenizer::write(String( m_templateDocumentData->data(), m_templateDocumentData->size()), true);319 HTMLTokenizer::write(String(templateDocumentData->data(), templateDocumentData->size()), true); 322 320 setForceSynchronous(false); 323 321
Note: See TracChangeset
for help on using the changeset viewer.