Changeset 37655 in webkit
- Timestamp:
- Oct 17, 2008 8:56:24 AM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r37654 r37655 1 2008-10-15 Brett Wilson <brettw@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Have ImageDocument generate its own filename for the title of images 6 without relying on the suggested filename from the network layer, which 7 may be nonexistant or not relevant. 8 https://bugs.webkit.org/show_bug.cgi?id=21565 9 10 * loader/ImageDocument.cpp: 11 (WebCore::ImageTokenizer::finish): 12 1 13 2008-10-17 Alexey Proskuryakov <ap@webkit.org> 2 14 -
trunk/WebCore/loader/ImageDocument.cpp
r36929 r37655 121 121 122 122 IntSize size = cachedImage->imageSize(m_doc->frame()->pageZoomFactor()); 123 if (size.width()) 124 m_doc->setTitle(imageTitle(cachedImage->response().suggestedFilename(), size)); 123 if (size.width()) { 124 // Compute the title, we use the filename of the resource, falling 125 // back on the hostname if there is no path. 126 String fileName = m_doc->url().lastPathComponent(); 127 if (fileName.isEmpty()) 128 fileName = m_doc->url().host(); 129 m_doc->setTitle(imageTitle(fileName, size)); 130 } 125 131 126 132 m_doc->imageChanged();
Note: See TracChangeset
for help on using the changeset viewer.