Title: [294976] trunk/Source/WebCore/html/HTMLAttachmentElement.cpp
- Revision
- 294976
- Author
- katherine_che...@apple.com
- Date
- 2022-05-27 19:12:20 -0700 (Fri, 27 May 2022)
Log Message
[WK2] Attachment icons do not update after updating filewrapper
https://bugs.webkit.org/show_bug.cgi?id=241026
rdar://86293273
Reviewed by Wenson Hsieh.
In the case of certain iWork file types downloaded from iCloud that require
thumbnails, we don't remove the progress update once the filewrapper is updated
with the complete attachment, which prevents the thumbnail from appearing.
This patch removes the progress attribute once the thumbnail is updated
so we know we can now paint the icon.
No new tests. There's no clear way to test this change. For previous thumbnail bugs
we swizzled the thumbnail generator code to make sure we were generating
thumbnails; however, this bug is a case of the thumbnail being generated but not
displayed. Similarly, we can't compare the attachment size because it is the same for
the attachment with and without the correct thumbnail.
* Source/WebCore/html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::updateThumbnail):
Canonical link: https://commits.webkit.org/251080@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/html/HTMLAttachmentElement.cpp (294975 => 294976)
--- trunk/Source/WebCore/html/HTMLAttachmentElement.cpp 2022-05-28 01:46:33 UTC (rev 294975)
+++ trunk/Source/WebCore/html/HTMLAttachmentElement.cpp 2022-05-28 02:12:20 UTC (rev 294976)
@@ -272,7 +272,7 @@
void HTMLAttachmentElement::updateThumbnail(const RefPtr<Image>& thumbnail)
{
m_thumbnail = thumbnail;
-
+ removeAttribute(HTMLNames::progressAttr);
if (auto* renderer = this->renderer())
renderer->invalidate();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes